public IEnumerator PlayerShouldLooseMoveWhenAddingItToSequence() { _gameHandler.SpawnNewPlayer(); PlayerController playerController = _gameHandler.GetPlayerController(Player.Red); //Where in the direction array the move is stored int moveStoreIndex = playerController.GetIndexForDirection(Direction.Up); //adding move, which in turn, should remove it from the player so he is not able to use it multiple times _gameHandler.AddMoveToSequence(Player.Red, Direction.Up, moveStoreIndex); //The player should now have a blank playerMove instead Assert.True(playerController.GetMoves()[moveStoreIndex] == Direction.Blank); yield break; }
public void RPC_AddMoveToSequence(PlayerTags p, Direction d, int moveId, int index) { gameHandler.AddMoveToSequence(p, d, moveId, index); }
/* * Networked */ public override void AddMoveToSequence(PlayerTags p, Direction d, int moveId, int index) { MyNetworkedAgent.AddMoveToSequence(p, d, moveId, index); localGameHandler.AddMoveToSequence(p, d, moveId, index); }