public DoorHto(DoorDirection direction) { Direction = direction; CloseDoor = new CloseDoorAction(direction == DoorDirection.None); OpenDoor = new OpenDoorAction(direction == DoorDirection.None); }
public override AbstractAction SelectAction() { Pc pc = (Pc)Being; string command = ((VhGameController)GameController.Instance).Command; Engine.World.Beings.Actions.AbstractAction action = null; // if (command == "wait") { action = new WaitAction(pc); } // else if (command == "north") { action = new MoveAction(pc, Step.NORTH); } else if (command == "south") { action = new MoveAction(pc, Step.SOUTH); } else if (command == "east") { action = new MoveAction(pc, Step.EAST); } else if (command == "west") { action = new MoveAction(pc, Step.WEST); } else if (command == "north-east") { action = new MoveAction(pc, Step.NORTH_EAST); } else if (command == "north-west") { action = new MoveAction(pc, Step.NORTH_WEST); } else if (command == "south-east") { action = new MoveAction(pc, Step.SOUTH_EAST); } else if (command == "south-west") { action = new MoveAction(pc, Step.SOUTH_WEST); } else if (command == "take-stairs") { action = new TakeStairsAction(pc); } else if (command == "close-door") { action = new CloseDoorAction(pc); } else if (command == "pick-up") { action = new VhStackingPickUpAction(pc); } else if (command == "drop") { action = new StackingDropAction(pc); } else if (command == "use") { action = new StackingUseItemAction(pc); } else if (command == "manage-equipment") { action = new ManageEquipmentAction(pc); } // return(action); }
protected void Close(Entity door) { var action = new CloseDoorAction(Entity, door); action.OnProcess(); }