void Awake()
	{
		Instance = this;	//Set the instance to equal this object

		position = startingPosition;
		desiredPosition = startingPosition;

		//Update controls
		UpdateCameraControls ();
	}
	public Animator anim;		//A variable reference to the animator of the character


	void Awake () 
	{
		cameraFollow = characterCamera.gameObject.GetComponent <CharacterCameraFollow>();

		agent.destination = transform.position;	//The agent will follow this object

		//Make Sure Characters spawn on the intended spot. Then Turn the agent back on. 
		//This will prevent spawning under the ground. or in midair.
		agent.enabled = false;
		transform.localPosition = Vector3.forward;

		//Call the Character Camera Follow object to find a camera
		//CharacterCameraFollow.UseExistingOrCreateNewMainCamera (); //Find a camera to follow this character

		SpawnToLeader ();

		CameraChange ();	//Initialise camera
	}
    void Awake()
    {
        Instance = this;	//Set the instance to equal this object

        //Update controls
        UpdateCameraControls ();
    }
Example #4
0
 void Awake()
 {
     Instance = this;                //Set the instance to equal this object
 }