예제 #1
0
        void Start()
        {
            blackboard = GetComponent <BEE_Blackboard>();
            if (blackboard == null)
            {
                blackboard = gameObject.AddComponent <BEE_Blackboard>();
            }

            fsmBeePollinate = GetComponent <FSM_BEE_POLLINATE>();
            if (fsmBeePollinate == null)
            {
                fsmBeePollinate = gameObject.AddComponent <FSM_BEE_POLLINATE>();
            }

            fsmBeeDefend = GetComponent <FSM_BEE_DEFEND>();
            if (fsmBeeDefend == null)
            {
                fsmBeeDefend = gameObject.AddComponent <FSM_BEE_DEFEND>();
            }

            fsmBeePollinate.enabled = true;
            fsmBeeDefend.enabled    = false;
        }
        void Start()
        {
            // get the machines that are states
            jailing = GetComponent <FSM_BATCAT_JAILING>();
            if (jailing == null)
            {
                jailing = gameObject.AddComponent <FSM_BATCAT_JAILING> ();
            }
            jailing.enabled = false;

            feeding = GetComponent <FSM_BEE_POLLINATE>();
            if (feeding == null)
            {
                feeding = gameObject.AddComponent <FSM_BEE_POLLINATE> ();
            }
            feeding.enabled = false;

            // get the blackboard
            blackboard = GetComponent <BATCAT_Blackboard>();
            if (blackboard == null)
            {
                blackboard = gameObject.AddComponent <BATCAT_Blackboard>();
            }
        }