Example #1
0
        private void Update()
        {
            JoystickAdaptor.Update();

            switch (State)
            {
            case ChuteState.Skydive:
                transform.rotation = Quaternion.Slerp(transform.rotation, m_TargetRotate, 0.03f);
                float forward = SkyDirveAnimatorControl();
                if (OnSkyDirveEvent != null)
                {
                    OnSkyDirveEvent(forward);
                }

                break;

            case ChuteState.Deployed:
                DeployedAnimatorControl();
                break;
            }

            if (OnUpdate != null)
            {
                OnUpdate(TerrainAltitude, m_ObjectToMove.GetPosition().y, Velocity.y);
            }
        }
Example #2
0
        private void Update()
        {
            JoystickAdaptor.Update();

            switch (State)
            {
            case ChuteState.Skydive:
                SkyDirveAnimatorControl();
                break;

            case ChuteState.Deployed:
                DeployedAnimatorControl();
                break;
            }

            if (m_ShadowPosition != Vector3.zero)
            {
                UpdateShadow();
            }
        }