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