Removing more networking things
This commit is contained in:
@@ -28,11 +28,10 @@
|
||||
private Vector2[] predefinedPath;
|
||||
private int predefinedPathIndex;
|
||||
|
||||
[UdonSynced] private Vector2 syncedPosition;
|
||||
[UdonSynced] private Vector2 targetDirection;
|
||||
[UdonSynced] private Vector2 direction;
|
||||
[UdonSynced] private float freezeSeconds;
|
||||
[UdonSynced] private bool frozen;
|
||||
private Vector2 syncedPosition;
|
||||
private Vector2 targetDirection;
|
||||
private float freezeSeconds;
|
||||
private bool frozen;
|
||||
|
||||
#region Animator constants
|
||||
private const string AnimatorKeyDead = "Dead";
|
||||
@@ -322,17 +321,6 @@
|
||||
UpdateAnimator();
|
||||
}
|
||||
|
||||
public override void OnPreSerialization()
|
||||
{
|
||||
syncedPosition = GetPosition();
|
||||
}
|
||||
|
||||
public override void OnDeserialization()
|
||||
{
|
||||
SetPosition(syncedPosition);
|
||||
UpdateAnimator();
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
Pellet pellet = other.gameObject.GetComponent<Pellet>();
|
||||
@@ -350,16 +338,14 @@
|
||||
|
||||
if (pellet.isPowerPellet)
|
||||
{
|
||||
if (Networking.IsOwner(gameObject)) gameController.GotPowerPellet();
|
||||
gameController.GotPowerPellet();
|
||||
freezeSeconds = 0.05f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Networking.IsOwner(gameObject)) gameController.GotPellet();
|
||||
gameController.GotPellet();
|
||||
freezeSeconds = 0.0166666666666667f;
|
||||
}
|
||||
|
||||
if (Networking.IsOwner(gameObject)) RequestSerialization();
|
||||
return;
|
||||
}
|
||||
else if (Networking.IsOwner(gameObject) && other.gameObject.GetComponent<BonusFruit>())
|
||||
|
||||
Reference in New Issue
Block a user