예제 #1
0
 private void Init()
 {
     if (AlternativeTextures != null)
     {
         m_closed = TilesetId != AlternativeTextures.Id("Open");
     }
 }
예제 #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);
 }
예제 #3
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;
 }
예제 #4
0
 private void Init()
 {
     if (AlternativeTextures == null)
     {
         return;
     }
     if (TilesetId == AlternativeTextures.Id("On"))
     {
         m_On = true;
     }
     else
     {
         m_On = false;
     }
 }
예제 #5
0
 public void setTexture(string textureName)
 {
     TilesetId = AlternativeTextures.Id(textureName);
 }
예제 #6
0
 protected Tile(string textureName)
 {
     TilesetId = AlternativeTextures.Id(textureName);
 }
예제 #7
0
 private void SwitchOff(GameActorPosition gameActorPosition, IAtlas atlas)
 {
     TilesetId  = AlternativeTextures.Id("Off");
     Switchable = Switchable?.Switch(gameActorPosition, atlas);
     m_On       = false;
 }