Inheritance: DynamicTile, ISwitcherGameActor, IInteractableGameActor
Beispiel #1
0
 public void Switch(GameActorPosition gameActorPosition, IAtlas atlas, ITilesetTable table)
 {
     var leverOff = new LeverSwitchOff(table, Position);
     atlas.ReplaceWith(new GameActorPosition(this, (Vector2)Position, LayerType.ObstacleInteractable), leverOff);
     if (Switchable == null) return;
     leverOff.Switchable = Switchable.Switch(null, atlas, table) as ISwitchableGameActor;
 }
        public void Switch(GameActorPosition gameActorPosition, IAtlas atlas, ITilesetTable table)
        {
            var leverOff = new LeverSwitchOff(table, Position);

            atlas.ReplaceWith(new GameActorPosition(this, (Vector2)Position, LayerType.ObstacleInteractable), leverOff);
            if (Switchable == null)
            {
                return;
            }
            leverOff.Switchable = Switchable.Switch(null, atlas, table) as ISwitchableGameActor;
        }