Exemple #1
0
    /*
     * Functions that implement the Unity callbacks Start() and FixedUpdate().
     */

    void Start()
    {
        // Get the specific script for this drone.
        thisScript = gameObject.GetComponent <FlyingDroneScript>();
        droneScr   = gameObject.GetComponent <FlyingDroneSpecificScript>();

        InitializeModes();

        // Force initial state to be what user has selected in the Inspector.
        SetUserTravelAndMotion(true);
        SetUserMode(true);

        InvokeRepeating("CheckFolloweeMoved", 0.5f, 1.0f);
    }
    /*
	 * Functions that implement the Unity callbacks Start() and FixedUpdate().
	 */

    void Start()
    {
        // Get the specific script for this drone.
        thisScript = gameObject.GetComponent<FlyingDroneScript>();
        droneScr = gameObject.GetComponent<FlyingDroneSpecificScript>();

        InitializeModes();

        // Force initial state to be what user has selected in the Inspector.
        SetUserTravelAndMotion(true);
        SetUserMode(true);

        // Start the Finite State Machine (FSM).
        //EnterStartState();
        SetHoverMode();

        InvokeRepeating("CheckFolloweeMoved", 0.5f, 1.0f);
    }