This commit is contained in:
CortexCore
2024-04-22 03:48:37 +08:00
parent 0362b2c606
commit c1f51826b3
35 changed files with 556 additions and 270 deletions

View File

@@ -62,6 +62,7 @@ namespace BITKit.Entities
/// </summary>
public interface IEntityMovement:IStateMachine<IEntityMovementState>
{
Vector3 Size => Vector3.one;
float ReferenceSpeed => 2.5f;
Vector3 Position { get; set; }
Quaternion Rotation { get; set; }
@@ -138,5 +139,6 @@ namespace BITKit.Entities
void BeforeUpdateMovement(float deltaTime);
void AfterUpdateMovement(float deltaTime);
void ExecuteCommand<T>(T command);
void DrawGizmos();
}
}

View File

@@ -81,8 +81,8 @@ namespace BITKit.Entities
{
public override DamageMessage ReadBinary(BinaryReader reader)
{
UnityEntitiesService.TryGetEntity(reader.ReadUInt64(),out var initiator);
UnityEntitiesService.TryGetEntity(reader.ReadUInt64(),out var target);
UnityEntitiesService.TryGetEntity(reader.ReadInt32(),out var initiator);
UnityEntitiesService.TryGetEntity(reader.ReadInt32(),out var target);
return new DamageMessage()
{
Initiator = initiator as Entity,

View File

@@ -3,7 +3,9 @@ using System.Collections.Generic;
using BITFALL.Rig;
using BITKit.Entities;
using Cysharp.Threading.Tasks.Triggers;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace BITKit
@@ -14,6 +16,7 @@ namespace BITKit
[SerializeField] private EntityHitbox[] hitboxes;
[SerializeReference,SubclassSelector] private IReference[] tagReferences;
#if UNITY_EDITOR
[BIT]
private void Build()
{
@@ -73,5 +76,6 @@ namespace BITKit
}
EditorUtility.SetDirty(this);
}
#endif
}
}