public ISwitchableGameActor Switch(GameActorPosition gameActorPosition, IAtlas atlas, ITilesetTable table) { RcDoorClosed closedDoor = new RcDoorClosed(table, Position); bool added = atlas.Add(new GameActorPosition(closedDoor, (Vector2)Position, LayerType.ObstacleInteractable), true); if (!added) return this; atlas.Remove(new GameActorPosition(this, (Vector2)Position, LayerType.OnGroundInteractable)); return closedDoor; }
public void ApplyGameAction(IAtlas atlas, GameAction gameAction, Vector2 position, ITilesetTable tilesetTable) { var doorOpened = new SimpleDoorOpened(tilesetTable); bool added = atlas.Add(new GameActorPosition(doorOpened, position, LayerType.OnGroundInteractable)); if (added) { atlas.Remove(new GameActorPosition(this, position, LayerType.ObstacleInteractable)); } }
public void ApplyGameAction(IAtlas atlas, GameAction gameAction, Vector2 position, ITilesetTable tilesetTable) { var doorOpened = new SimpleDoorOpened(tilesetTable); bool added = atlas.Add(new GameActorPosition(doorOpened, position, LayerType.OnGroundInteractable)); if (added) { atlas.Remove(new GameActorPosition(this, position, LayerType.ObstacleInteractable)); } }
public override void Resolve(GameActorPosition target, IAtlas atlas, ITilesetTable table) { ICanPickGameObject picker = Sender as ICanPickGameObject; IPickableGameActor pickItem = target.Actor as IPickableGameActor; if (picker == null || pickItem == null) return; if (picker.AddToInventory(pickItem)) atlas.Remove(target); }
public ISwitchableGameActor Switch(GameActorPosition gameActorPosition, IAtlas atlas, ITilesetTable table) { RcDoorClosed closedDoor = new RcDoorClosed(table, Position); bool added = atlas.Add(new GameActorPosition(closedDoor, (Vector2)Position, LayerType.ObstacleInteractable), true); if (!added) { return(this); } atlas.Remove(new GameActorPosition(this, (Vector2)Position, LayerType.OnGroundInteractable)); return(closedDoor); }
public override void Resolve(GameActorPosition target, IAtlas atlas, ITilesetTable table) { if (target.Actor is Apple || target.Actor is Pear) { atlas.Remove(target); } var switcher = target.Actor as ISwitcherGameActor; if (switcher != null) { switcher.Switch(target, atlas, table); } }
public override void Resolve(GameActorPosition target, IAtlas atlas) { ICanPickGameObject picker = Sender as ICanPickGameObject; IPickableGameActor pickItem = target.Actor as IPickableGameActor; if (picker == null || pickItem == null) { return; } if (picker.AddToInventory(pickItem)) { atlas.Remove(target); } }
public void Update(IAtlas atlas, ITilesetTable table) { atlas.Remove(new GameActorPosition(this, (Vector2)Position, LayerType.ObstacleInteractable)); }
public void Burn(GameActorPosition gameActorPosition, IAtlas atlas, ITilesetTable table) { atlas.Remove(gameActorPosition); }
public void DestroyTile(string layer, int x, int y) { m_atlas.Remove(new GameActorPosition(null, new Vector2(x, y), Layer(layer))); }
public void Update(IAtlas atlas) { atlas.Remove(new GameActorPosition(this, (Vector2)Position, LayerType.ObstacleInteractable)); }
public void Burn(GameActorPosition gameActorPosition, IAtlas atlas) { atlas.Remove(gameActorPosition); }
public void Burn(GameActorPosition gameActorPosition, IAtlas atlas, ITilesetTable table) { atlas.Remove(gameActorPosition); }