Inheritance: DynamicTile, ISwitcherGameActor, IInteractableGameActor
コード例 #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;
 }
コード例 #2
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;
        }