public void Init(GameController gameController, int id) { this.gameController = gameController; ID = id; Position = new TimeVector("Position", x => transform.position = x, () => transform.position, true); }
public virtual void Init(GameController gameController, int id) { this.gameController = gameController; ID = id; prevFlagDestroy = false; Position = new TimeVector("Position", x => transform.position = x, () => transform.position, canClearFuturePosition: true); }
public void Init(GameController gameController, int id) { this.gameController = gameController; ID = id; name = $"Player {id.ToString()}"; if (id == gameController.CurrentPlayerID) { PlayerInput.enabled = true; DisableShaders(); } Position = new TimeVector("Position", x => Rigidbody.position = x, () => Rigidbody.position); Velocity = new TimeVector("Velocity", x => Rigidbody.velocity = x, () => Rigidbody.velocity); }