예제 #1
0
 void OnAirshipTrigger()
 {
     if (m_pingPongFlag)
     {
         CEntityAirship.GetInstance().StartCutScene();
         CEntityCaptain.GetInstance().StartCutScene();
     }
 }
예제 #2
0
    // Called once the cutscene has ended
    void OnCutSceneEnd()
    {
        if (!m_pingPongFlag)
        {
            if (GruntObject != null)
            {
                CEntityGrunt grunt = GruntObject.GetComponent <CEntityGrunt>();
                if (grunt != null)
                {
                    grunt.SetGruntState(GruntState.Walking);
                }
            }

            if (m_camera == null)
            {
                Debug.LogError("Camera is null on a cutscene: " + name);
            }

            m_camera.ResetLookAtTransform();
            m_player.SetPlayerState(PlayerState.Standing);
            m_camera.DistanceFromPlayer = m_initialDistanceFromPlayer;
            m_camera.MaxPositionsStored = m_maxPositionsStored;
            m_active = false;
            enabled  = false;
            GameObject.Destroy(this.gameObject);

            if (this.gameObject.name == "AirshipTriggerStart")
            {
                m_hasSeenAirshipCutscene = true;
            }

            //only occurs if airship cutscene
            if (CEntityAirship.GetInstance())
            {
                CEntityAirship.GetInstance().EndCutScene();
            }
            if (CEntityCaptain.GetInstance())
            {
                CEntityCaptain.GetInstance().EndCutScene();
            }
        }
    }
    public void PushPlayerFromTower()
    {
        if (m_playerState == PlayerState.FallingFromTower)
        {
            return;
        }

        rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
        m_playerState         = PlayerState.FallingFromTower;
        m_dead.y    = transform.position.y;
        m_dead.time = Time.time * 1000.0f;

        //try to get captain
        CEntityCaptain captain = CEntityCaptain.GetInstance();

        if (captain)
        {
            captain.PlayLaughAudio();
        }
    }
예제 #4
0
 void OnTriggerEnter(Collider collider)
 {
     if (!m_airship)
     {
         m_airship = CEntityAirship.GetInstance();
     }
     if (EnableAirship)
     {
         m_airship.gameObject.SetActiveRecursively(true);
         //m_airship.StartCutScene();
         CEntityCaptain captain = CEntityCaptain.GetInstance();
         if (captain != null)
         {
             captain.StartCutScene();
         }
     }
     else
     {
         m_airship.gameObject.SetActiveRecursively(false);
     }
 }