void Start ()
{
		currentStatus = AnimationStatus.Idle;

		
	// By default loop all animations
   // animationGameObject.animation.wrapMode = WrapMode.Loop;

    animationGameObject.animation["run"].layer = -1;
    animationGameObject.animation["run"].wrapMode = WrapMode.Loop;
    animationGameObject.animation["walk"].layer = -1;
    animationGameObject.animation["walk"].wrapMode = WrapMode.Loop;
    animationGameObject.animation["idle"].layer = -2;
    animationGameObject.animation.SyncLayer(-1);

    animationGameObject.animation["fly"].layer = 1;
    animationGameObject.animation["fly"].wrapMode = WrapMode.ClampForever;

   // animationGameObject.animation["elevate"].layer = 1;
   // animationGameObject.animation["lower"].layer = 1;


    animationGameObject.animation["idle"].wrapMode = WrapMode.Loop;

	// The jump animation is clamped and overrides all others
    animationGameObject.animation["jump"].layer = 10;
    animationGameObject.animation["jump"].wrapMode = WrapMode.ClampForever;

    animationGameObject.animation["fall"].layer = 10;
    animationGameObject.animation["fall"].wrapMode = WrapMode.Loop;

    animationGameObject.animation["land"].layer = 10;
    animationGameObject.animation["land"].wrapMode = WrapMode.Once;

    animationGameObject.animation["fallHit"].layer = 10;
    animationGameObject.animation["fallHit"].wrapMode = WrapMode.Once;




	// We are in full control here - don't let any other animations play when we start
    animationGameObject.animation.Stop();
    animationGameObject.animation.Play("idle");


    characterController = GetComponent<ThirdPersonController>();
    flyingController = GetComponent<ThirdPersonFlyingController>();
    

}
    // Use this for initialization
    void Start()
    {
        thirdPersonController       = GetComponent <ThirdPersonController>();
        thirdPersonFlyingController = GetComponent <ThirdPersonFlyingController>();

        mouseOrbit     = GameObject.Find("LookTarget").GetComponent <MouseOrbit>();
        mouseAimFlying = GameObject.Find("LookTarget").GetComponent <MouseFlying>();

        //playerLookTarget = GetComponent<PlayerLookTarget>();
        headLookController = GetComponent <HeadLookController>();


        _lookDirection = thirdPersonController.MoveDirection();
        _inAirVelocity = 0.0f;

        _health = 100;

        _catsCollected = 0;
    }
    // Use this for initialization
    void Start()
    {
		thirdPersonController = GetComponent<ThirdPersonController>();
        thirdPersonFlyingController = GetComponent<ThirdPersonFlyingController>();
		
		mouseOrbit = GameObject.Find("LookTarget").GetComponent<MouseOrbit>();
        mouseAimFlying = GameObject.Find("LookTarget").GetComponent<MouseFlying>();

		//playerLookTarget = GetComponent<PlayerLookTarget>();
		headLookController = GetComponent<HeadLookController>();
				
		
		_lookDirection = thirdPersonController.MoveDirection();
		_inAirVelocity = 0.0f;

        _health = 100;
		
		_catsCollected = 0;
    }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     playerGO         = GameObject.FindGameObjectWithTag("Player");
     flyingController = playerGO.GetComponent <ThirdPersonFlyingController>();
 }
Beispiel #5
0
 private void Awake()
 {
     flying  = GetComponent <ThirdPersonFlyingController>();
     walking = GetComponent <ThirdPersonCharacterController>();
     rb      = GetComponent <Rigidbody>();
 }
 // Use this for initialization
 void Start()
 {
     playerGO = GameObject.FindGameObjectWithTag("Player");
     flyingController = playerGO.GetComponent<ThirdPersonFlyingController>();
    
 }