Beispiel #1
0
 void OnMouseDown()
 {
     if (!tileChosen)
     {
         tileChosen = true;
         tile.enableTileRotation();
     }
 }
Beispiel #2
0
        private void ExecuteActionRoomRotated(ActionRoomRotated action)
        {
            if (gManager.onlineGameInterface.WaitingForExpectedState())
            {
                gManager.onlineGameInterface.ForceEndReplayAction(); return;
            }

            TileBehaviorIHM      tile  = GetTileOfIndex(action.tileIndex).GetComponent <TileBehaviorIHM>();
            CharacterBehaviorIHM chara = GetTokenByNameAndPlayerId(action.tokenName, action.playerId).GetComponent <CharacterBehaviorIHM>();

            chara.characterSelection();
            tile.inverseRotationDirection = (tile.associatedTile.clockwiseRotation != action.clockwise);
            tile.enableTileRotation(); // enable rotation, apply the rotation and than disable rotation
            // EndReplayAction is called at the end of the rotation.
        }