示例#1
0
    public void interactWith()
    {
        AW2DAction interactWithAction = states[currentState].interactWithAction;

        interactWithAction.subject = this;
        interactWithAction.execute();
    }
示例#2
0
    public void talkTo()
    {
        AW2DAction talkToAction = states[currentState].talkToAction;

        talkToAction.subject = this;
        talkToAction.execute();
    }
示例#3
0
    // MARK: - Actions

    public void examine()
    {
        AW2DAction examineAction = states[currentState].examineAction;

        examineAction.subject = this;
        examineAction.execute();
    }
示例#4
0
    void pickUp()
    {
        AW2DAction pickUpAction = states[currentState].pickUpAction;

        pickUpAction.subject = this;
        pickUpAction.execute();
    }
示例#5
0
    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);
    }