Esempio n. 1
0
 public void ApplyGameAction(IAtlas atlas, GameAction gameAction, Vector2 position)
 {
     if (m_closed)
     {
         TilesetId = AlternativeTextures.Id("Open");
         atlas.MoveToOtherLayer(new GameActorPosition(this, position, LayerType.ObstacleInteractable), LayerType.OnGroundInteractable);
     }
     else
     {
         TilesetId = AlternativeTextures.Id("Closed");
         atlas.MoveToOtherLayer(new GameActorPosition(this, position, LayerType.OnGroundInteractable), LayerType.ObstacleInteractable);
     }
     m_closed = !m_closed;
 }
Esempio n. 2
0
 public ISwitchableGameActor SwitchOff(GameActorPosition gameActorPosition, IAtlas atlas)
 {
     TilesetId = AlternativeTextures.Id("Open");
     atlas.MoveToOtherLayer(new GameActorPosition(this, new Vector2(Position), LayerType.OnGroundInteractable), LayerType.ObstacleInteractable);
     m_closed = false;
     return(this);
 }