public void interactWith() { AW2DAction interactWithAction = states[currentState].interactWithAction; interactWithAction.subject = this; interactWithAction.execute(); }
public void talkTo() { AW2DAction talkToAction = states[currentState].talkToAction; talkToAction.subject = this; talkToAction.execute(); }
// MARK: - Actions public void examine() { AW2DAction examineAction = states[currentState].examineAction; examineAction.subject = this; examineAction.execute(); }
void pickUp() { AW2DAction pickUpAction = states[currentState].pickUpAction; pickUpAction.subject = this; pickUpAction.execute(); }
bool useOn(AW2DEntity entity = null) { AW2DAction useOnAction = states[currentState].useOnAction; useOnAction.subject = this; useOnAction.execute(); AW2DInteractAction useInteraction = useOnAction as AW2DInteractAction; if (useInteraction != null) { useInteraction.interactionObject = entity; useInteraction.execute(); return(useInteraction.hasInteracted); } useOnAction.execute(); return(false); }