mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
控制台支持动画顺序播放
This commit is contained in:
parent
bad45e58b9
commit
1c9c65f680
@ -41,6 +41,10 @@ namespace VPet_Simulator.Core
|
||||
/// </summary>
|
||||
public event Action<Main> TimeUIHandle;
|
||||
/// <summary>
|
||||
/// 如果不开启功能模式,默认状态设置
|
||||
/// </summary>
|
||||
public GameSave.ModeType NoFunctionMOD = GameSave.ModeType.Happy;
|
||||
/// <summary>
|
||||
/// 是否开始运行
|
||||
/// </summary>
|
||||
public bool IsWorking { get; private set; } = false;
|
||||
@ -68,7 +72,8 @@ namespace VPet_Simulator.Core
|
||||
{
|
||||
LoadTouchEvent();
|
||||
}
|
||||
|
||||
if (!core.Controller.EnableFunction)
|
||||
Core.Save.Mode = NoFunctionMOD;
|
||||
var ig = Core.Graph.FindGraph(GraphCore.GraphType.StartUP, core.Save.Mode);
|
||||
//var ig2 = Core.Graph.FindGraph(GraphCore.GraphType.Default, core.GameSave.Mode);
|
||||
PetGrid2.Visibility = Visibility.Collapsed;
|
||||
|
@ -251,8 +251,9 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
else
|
||||
{
|
||||
Core.Save.Mode = GameSave.ModeType.Happy;
|
||||
//Core.Save.Mode = GameSave.ModeType.Happy;
|
||||
//Core.GameSave.Mode = GameSave.ModeType.Ill;
|
||||
Core.Save.Mode = NoFunctionMOD;
|
||||
}
|
||||
|
||||
//UIHandle
|
||||
|
@ -117,7 +117,9 @@
|
||||
<MenuItem x:Name="MenuDIY" Header="自定" HorizontalContentAlignment="Center" Click="MenuDIY_Click"
|
||||
x:FieldModifier="public" Padding="0" />
|
||||
<MenuItem x:Name="MenuSetting" Header="系统" HorizontalContentAlignment="Center" x:FieldModifier="public"
|
||||
Padding="0" />
|
||||
Padding="0">
|
||||
<MenuItem x:Name="MenuMODConfig" Header="MOD设置" HorizontalContentAlignment="Center" Visibility="Collapsed" x:FieldModifier="public" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
@ -31,7 +31,7 @@ namespace VPet_Simulator.Windows
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
public int verison { get; } = 40;
|
||||
public int verison { get; } = 20;
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
|
@ -76,7 +76,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ChatGPT.API.Framework, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ChatGPT.API.Framework.1.0.3\lib\net462\ChatGPT.API.Framework.dll</HintPath>
|
||||
<HintPath>..\packages\ChatGPT.API.Framework.1.0.2\lib\net462\ChatGPT.API.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LinePutScript, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LinePutScript.1.8.1\lib\net48\LinePutScript.dll</HintPath>
|
||||
|
@ -20,6 +20,34 @@
|
||||
<ListBox x:Name="GraphListBox" Margin="0,49,0,0" MouseDoubleClick="GraphListBox_MouseDoubleClick" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="动画播放">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="15*" />
|
||||
<RowDefinition Height="110*" />
|
||||
<RowDefinition Height="10*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Background="{x:Null}" Content="双击添加/移除播放列表内容 选择状态模式:" Grid.RowSpan="2" Grid.ColumnSpan="2" />
|
||||
<ComboBox x:Name="ComboxPlayMode" VerticalAlignment="Top" Margin="110,25,5,0" SelectedIndex="1"
|
||||
Grid.ColumnSpan="2">
|
||||
<ComboBoxItem Content="Happy" />
|
||||
<ComboBoxItem Content="Nomal" />
|
||||
<ComboBoxItem Content="PoorCondition" />
|
||||
<ComboBoxItem Content="Ill" />
|
||||
</ComboBox>
|
||||
<ListBox x:Name="GraphListPlayerBox" Grid.Row="1" Margin="5"
|
||||
MouseDoubleClick="GraphListPlayerBox_MouseDoubleClick" />
|
||||
<ListBox x:Name="GraphListWillPlayBox" Grid.Row="1" Margin="5" Grid.Column="1"
|
||||
MouseDoubleClick="GraphListWillPlayBox_MouseDoubleClick" />
|
||||
<Button Grid.Row="2" Grid.ColumnSpan="2" Margin="5" Content="开始播放" Click="Play_Click" />
|
||||
<Button VerticalAlignment="Top" Content="ADD" HorizontalAlignment="Right" Grid.Column="1" Margin="5"
|
||||
Click="PlayADD_Click" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="显示逻辑">
|
||||
<Grid>
|
||||
<Label Background="{x:Null}" Content="双击运行显示效果" />
|
||||
@ -55,8 +83,9 @@
|
||||
<Grid>
|
||||
<Label Background="{x:Null}" Content="输入要说的话,按说话键发送: 选择说话类型:" />
|
||||
<ComboBox x:Name="CombSay" VerticalAlignment="Top" Margin="110,26,5,0" />
|
||||
<TextBox x:Name="SayTextBox" TextWrapping="Wrap" pu:TextBoxHelper.Watermark="在这里输入要说话的内容" VerticalAlignment="Top"
|
||||
Margin="5,54,5,0" Height="200" AcceptsReturn="True" VerticalContentAlignment="Top" />
|
||||
<TextBox x:Name="SayTextBox" TextWrapping="Wrap" pu:TextBoxHelper.Watermark="在这里输入要说话的内容"
|
||||
VerticalAlignment="Top" Margin="5,54,5,0" Height="200" AcceptsReturn="True"
|
||||
VerticalContentAlignment="Top" />
|
||||
<Button VerticalAlignment="Bottom" Content="说话" Click="Say_Click" FontSize="24" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
@ -1,9 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using VPet_Simulator.Core;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
using static VPet_Simulator.Core.GraphCore;
|
||||
|
||||
namespace VPet_Simulator.Windows
|
||||
@ -21,6 +24,7 @@ namespace VPet_Simulator.Windows
|
||||
foreach (string v in Enum.GetNames(typeof(GraphType)))
|
||||
{
|
||||
GraphListBox.Items.Add(v);
|
||||
GraphListPlayerBox.Items.Add(v);
|
||||
}
|
||||
foreach (string v in Enum.GetNames(typeof(GraphCore.Helper.SayType)))
|
||||
{
|
||||
@ -87,7 +91,44 @@ namespace VPet_Simulator.Windows
|
||||
{
|
||||
DestanceTimer.Stop();
|
||||
}
|
||||
List<Tuple<GraphType, GameSave.ModeType>> playlist = new List<Tuple<GraphType, GameSave.ModeType>>();
|
||||
private void GraphListPlayerBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
playlist.Add(new Tuple<GraphType, GameSave.ModeType>((GraphType)Enum.Parse(typeof(GraphType), (string)GraphListPlayerBox.SelectedItem),
|
||||
(GameSave.ModeType)Enum.Parse(typeof(GameSave.ModeType), (string)(((ComboBoxItem)ComboxPlayMode.SelectedItem).Content))));
|
||||
GraphListWillPlayBox.Items.Add((string)GraphListPlayerBox.SelectedItem + "_" + (string)((ComboBoxItem)ComboxPlayMode.SelectedItem).Content);
|
||||
}
|
||||
|
||||
private void Play_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DisplayList(new Queue<Tuple<GraphType, GameSave.ModeType>>(playlist));
|
||||
}
|
||||
public void DisplayList(Queue<Tuple<GraphType, GameSave.ModeType>> list)
|
||||
{
|
||||
if (list.Count == 0)
|
||||
{
|
||||
mw.Main.DisplayToNomal();
|
||||
return;
|
||||
}
|
||||
var v = list.Dequeue();
|
||||
var graph = mw.Main.Core.Graph.FindGraph(v.Item1, v.Item2);
|
||||
if (graph != null)
|
||||
{
|
||||
mw.Main.Display(graph, () => DisplayList(list));
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayList(list);
|
||||
}
|
||||
}
|
||||
|
||||
private void GraphListWillPlayBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
playlist.RemoveAt(GraphListWillPlayBox.SelectedIndex);
|
||||
GraphListWillPlayBox.Items.RemoveAt(GraphListWillPlayBox.SelectedIndex);
|
||||
}
|
||||
|
||||
private void PlayADD_Click(object sender, RoutedEventArgs e) => GraphListPlayerBox_MouseDoubleClick(sender, null);
|
||||
//private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
//{
|
||||
// switch(((TabControl)sender).SelectedIndex)
|
||||
|
@ -121,7 +121,7 @@
|
||||
Background="Transparent" BoxWidth="35" BoxHeight="18" ToggleSize="14"
|
||||
ToggleShadowColor="{x:Null}" ToggleBrush="{DynamicResource PrimaryDark}"
|
||||
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Checked="SwitchMsgOut_Checked"
|
||||
Unchecked="TopMostBox_Unchecked" ToolTip="将消息框置于外部" Content="将消息框置于外部"/>
|
||||
Unchecked="SwitchMsgOut_Checked" ToolTip="将消息框置于外部" Content="将消息框置于外部"/>
|
||||
<TextBlock Grid.Row="7" Text="开机启动" VerticalAlignment="Center" />
|
||||
<Grid Grid.Row="7" Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ChatGPT.API.Framework" version="1.0.3" targetFramework="net48" />
|
||||
<package id="ChatGPT.API.Framework" version="1.0.2" targetFramework="net48" />
|
||||
<package id="Facepunch.Steamworks" version="2.3.3" targetFramework="net48" />
|
||||
<package id="Facepunch.Steamworks.win32" version="2.3.3" targetFramework="net48" />
|
||||
<package id="LinePutScript" version="1.8.1" targetFramework="net48" />
|
||||
|
Loading…
Reference in New Issue
Block a user