Beispiel #1
0
    public override bool Execute()
    {
        switch (_rodFishingState)
        {
        case 0:    //initial state
            CreateAssets();
            _rodFishingState = 1;
            return(true);

        case 1:     //casting state
            bool stateTest = _castingStateMachine.Execute();
            //Debug.Log(stateTest);
            if (!stateTest)
            {
                _rodFishingState = 2;
            }
            return(true);

        case 2:

            break;

        case 3:

            break;
        }
        return(false);
    }
Beispiel #2
0
    public override bool Execute()
    {
        switch (_rodFishingState)
        {
        case 0:    //initial state
            CreateAssets();
            _rodFishingState = 1;
            return(true);

        case 1:     //casting state
            bool doneWithCastingStep = _castingStateMachine.Execute();
            //Debug.Log(stateTest);
            if (!doneWithCastingStep)
            {
                Debug.Log("Done with casting step");
                _rodFishingState = 2;
            }
            return(true);

        case 2:
            //bool doneWithEnticeStep = _enticeStateMachine.Execute();
            bool doneWithEnticeStep = false;
            if (!doneWithEnticeStep)
            {
                Debug.Log("Done with entice step");
                _rodFishingState = 3;
            }

            break;

        case 3:
            bool doneWithRetrievalStep = false;
            if (!doneWithRetrievalStep)
            {
                _rodFishingState = 4;
                Debug.Log("Done with Retrieval step.");
            }
            break;

        case 4:
            Debug.Log("You can stop fishing now");
            break;
        }
        return(false);
    }