导入角色动画,和增加角色控制

This commit is contained in:
2025-12-11 19:30:20 +08:00
parent a60a92e7ba
commit 7775fa30bb
1452 changed files with 592217 additions and 42573 deletions

View File

@@ -2,6 +2,7 @@
using Fantasy.Async;
using NBC;
using Fantasy.Entitas;
using Fantasy.Entitas.Interface;
using Unity.Mathematics;
using UnityEngine;
@@ -14,6 +15,19 @@ namespace NBF.Fishing2
{
public int ConfigId { get; set; } //配置表id
/// <summary>
/// 是否在地面
/// </summary>
public bool IsGrounded { get; set; }
/// <summary>
/// 是否在水里
/// </summary>
public bool IsInWater { get; set; }
public float Speed { get; set; }
public float RotationSpeed { get; set; }
private Vector3 position; //坐标
public Vector3 Position
@@ -45,10 +59,22 @@ namespace NBF.Fishing2
}
}
public uint State { get; set; }
public MapUnitState State { get; set; }
public string StateArgs { get; set; }
public void ChangeState(uint state, string args)
#region System
public class MapUnitDestroySystem : DestroySystem<MapUnit>
{
protected override void Destroy(MapUnit self)
{
}
}
#endregion
public void ChangeState(MapUnitState state, string args)
{
Scene.EventComponent.Publish(new ChangeState() { MapUnit = this, State = state, Args = args });
}
@@ -68,16 +94,6 @@ namespace NBF.Fishing2
}
}
// public UnitConfig Config()
// {
// return UnitConfig.Get(ConfigId);
// }
//
// public UnitType UnitType()
// {
// return Config().Type;
// }
#region View
public async FTask CreateView()
@@ -91,7 +107,7 @@ namespace NBF.Fishing2
unitUnity = AddComponent<UnitUnityComponent>();
await unitUnity.InitUnityObject();
}
#endregion
}
}