Fixed PacMan speed
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
@@ -9,7 +8,7 @@ namespace Marro.PacManUdon
|
||||
Moving,
|
||||
Stopped,
|
||||
Big,
|
||||
Dead,
|
||||
Dead,
|
||||
}
|
||||
|
||||
enum PacManState
|
||||
@@ -290,6 +289,7 @@ namespace Marro.PacManUdon
|
||||
// Debug.Log($"{gameObject} SetLevel {level}");
|
||||
defaultSpeed = PacManConstants.GetPacManDefaultSpeedForLevel(level);
|
||||
powerPelletSpeed = PacManConstants.GetPacManPowerPelletSpeedForLevel(level);
|
||||
UpdateSpeed();
|
||||
}
|
||||
|
||||
public void SetPowerPellet(bool powerPellet)
|
||||
@@ -357,6 +357,7 @@ namespace Marro.PacManUdon
|
||||
state = (PacManState)data.ReadByte(ref index);
|
||||
freezeSeconds = data.ReadFloat(ref index);
|
||||
frozen = data.ReadBool(ref index);
|
||||
|
||||
UpdateSpeed();
|
||||
|
||||
return base.WriteSyncedData(data, ref index, eventType);
|
||||
|
||||
Reference in New Issue
Block a user