Ejemplo n.º 1
0
    void Start()
    {
        rb       = GetComponent <Rigidbody>();
        coll     = GetComponent <Collider>();
        animator = GetComponent <Animator>();
        m_Camera = GetComponentInChildren <Manager_Camera>();

        currMoveSpeed      = moveSpeed;
        currGroundDistance = groundDistance;

        m_Camera.transform.parent = null;
    }
Ejemplo n.º 2
0
 IEnumerator ChangeOrientation(Manager_Camera.Orientation orientation, bool reverse)
 {
     // Change orientation
     switch (orientation)
     {
         case Manager_Camera.Orientation.Inverse:
             yield return StartCoroutine( "ChangeCameraProjection", reverse );
             break;
             
         case Manager_Camera.Orientation.UpsideDown:
             yield return StartCoroutine( "ChangeCameraAngle", reverse );
             break;
     }
     
     // Set current Orientation to the new one. If reverse set orientation back to normal
     if (reverse)
         Manager_Camera.CameraOrientation = Manager_Camera.Orientation.Normal;
     else
         Manager_Camera.CameraOrientation = orientation;
 }
Ejemplo n.º 3
0
 public override void ChangeCameraOrientation(Manager_Camera.Orientation orientation, bool reverse)
 {
     base.ChangeCameraOrientation(orientation, reverse);
     StartCoroutine(ChangeOrientation(orientation, reverse));
 }