Esempio n. 1
0
        public override string TakeAction(Actions.possibleActions actionToPerform)
        {
            switch (actionToPerform)
            {
            case Actions.possibleActions.open:
                if (isLocked)
                {
                    return("The door is locked and will not open");
                }
                else
                {
                    isOpen     = true;
                    isPassable = true;
                    return("You've opened the door");
                }
                break;

            case Actions.possibleActions.close:
                isOpen     = false;
                isPassable = false;
                return("You've closed the door");

                break;

            case Actions.possibleActions.lockLock:
                isLocked = true;
                return("You've locked the door");

                break;

            case Actions.possibleActions.unlockLock:
                isLocked = false;
                return("You've unlocked the door");

                break;
            }
            return("");
        }
Esempio n. 2
0
 public virtual string TakeAction(Actions.possibleActions actionToPerform)
 {
     return("");
 }
Esempio n. 3
0
 public string Action(int objectID, Actions.possibleActions actionToPerform)
 {
     return(gameObjectList.Action(objectID, actionToPerform));
 }