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