Added NetworkManager
This commit is contained in:
@@ -478,7 +478,7 @@ namespace Marro.PacManUdon
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateAnimator()
|
||||
protected override void UpdateAnimator()
|
||||
{
|
||||
if (!gameObject.activeInHierarchy)
|
||||
return;
|
||||
@@ -783,43 +783,15 @@ namespace Marro.PacManUdon
|
||||
|
||||
public bool IsScared => isScared;
|
||||
|
||||
public override Vector2 GetPosition()
|
||||
{
|
||||
return (Vector2)transform.localPosition;
|
||||
}
|
||||
|
||||
public override void SetPosition(Vector2 position)
|
||||
{
|
||||
GridMoverTools.SetPosition(position, transform);
|
||||
}
|
||||
|
||||
public override Vector2 GetDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void SetDirection(Vector2 direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
UpdateAnimator();
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public void SetSpeed(float speed)
|
||||
{
|
||||
this.speed = speed;
|
||||
UpdateAnimator();
|
||||
}
|
||||
|
||||
public override void OnPreSerialization()
|
||||
public override void AppendSyncedData(byte[][] data, ref int offset)
|
||||
{
|
||||
syncedPosition = GetPosition();
|
||||
}
|
||||
|
||||
public override void OnDeserialization()
|
||||
{
|
||||
SetPosition(syncedPosition);
|
||||
UpdateAnimator();
|
||||
base.AppendSyncedData(data, ref offset);
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
|
||||
Reference in New Issue
Block a user