mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交Unity 联机Pro
This commit is contained in:
21
JNFrame2/Assets/Scripts/Game/Input/DInputSystem.cs
Normal file
21
JNFrame2/Assets/Scripts/Game/Input/DInputSystem.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using JNGame.Sync.System.View;
|
||||
using JNGame.Util.Types;
|
||||
|
||||
namespace Game.Input
|
||||
{
|
||||
public class DInputSystem : JNInputSystem
|
||||
{
|
||||
|
||||
private KeyValue<Type, int> _tClass = new KeyValue<Type, int>();
|
||||
protected override KeyValue<Type, int> TClass => _tClass;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
_tClass.Add(typeof(IDWorld),0);
|
||||
_tClass.Add(typeof(IDPlayer),1);
|
||||
}
|
||||
}
|
||||
}
|
3
JNFrame2/Assets/Scripts/Game/Input/DInputSystem.cs.meta
Normal file
3
JNFrame2/Assets/Scripts/Game/Input/DInputSystem.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff9df2dda66b4661b9c1459e93f9c56c
|
||||
timeCreated: 1721638606
|
34
JNFrame2/Assets/Scripts/Game/Input/IDPlayer.cs
Normal file
34
JNFrame2/Assets/Scripts/Game/Input/IDPlayer.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using JNGame.Math;
|
||||
using JNGame.Sync.System.View;
|
||||
|
||||
namespace Game.Input
|
||||
{
|
||||
|
||||
public class IDPlayerMoveVector
|
||||
{
|
||||
public LFloat X;
|
||||
public LFloat Y;
|
||||
|
||||
public LVector2 ToLVector2()
|
||||
{
|
||||
return new LVector2(X, Y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DPlayerSystem 的输入类
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class IDPlayer : JNInputJson
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 移动的向量
|
||||
/// </summary>
|
||||
public IDPlayerMoveVector? MoveVector;
|
||||
|
||||
}
|
||||
|
||||
}
|
3
JNFrame2/Assets/Scripts/Game/Input/IDPlayer.cs.meta
Normal file
3
JNFrame2/Assets/Scripts/Game/Input/IDPlayer.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 342bf3e39b8641a3a60be01d52293a32
|
||||
timeCreated: 1722225398
|
12
JNFrame2/Assets/Scripts/Game/Input/IDPlayer2.cs
Normal file
12
JNFrame2/Assets/Scripts/Game/Input/IDPlayer2.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using JNGame.Math;
|
||||
using JNGame.Sync.System.View;
|
||||
|
||||
namespace Game.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// DPlayerSystem 的输入类
|
||||
/// </summary>
|
||||
public class IDPlayer2 : JNInputJson
|
||||
{
|
||||
}
|
||||
}
|
3
JNFrame2/Assets/Scripts/Game/Input/IDPlayer2.cs.meta
Normal file
3
JNFrame2/Assets/Scripts/Game/Input/IDPlayer2.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: adc56bc7451447ddb670bb1e8edafb9c
|
||||
timeCreated: 1722248435
|
24
JNFrame2/Assets/Scripts/Game/Input/IDWorld.cs
Normal file
24
JNFrame2/Assets/Scripts/Game/Input/IDWorld.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using JNGame.Sync.System.View;
|
||||
|
||||
namespace Game.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// DWorldSystem 的输入类
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class IDWorld : JNInputJson
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 创建球
|
||||
/// </summary>
|
||||
public bool IsAdd;
|
||||
|
||||
/// <summary>
|
||||
/// 主角创建
|
||||
/// </summary>
|
||||
public bool IsPlayerCreate;
|
||||
|
||||
}
|
||||
}
|
3
JNFrame2/Assets/Scripts/Game/Input/IDWorld.cs.meta
Normal file
3
JNFrame2/Assets/Scripts/Game/Input/IDWorld.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2f47660de0d4e36b6b6a58f674fbc24
|
||||
timeCreated: 1721635974
|
Reference in New Issue
Block a user