// Use this for initialization void Start() { INSTANCE = this; m_state = CaptainState.Idle; m_animation = GetComponentInChildren <Animation>(); //setup cutscene anim list m_cutsceneAnims = new ArrayList(); m_cutsceneAnims.Add("taunt"); m_cutsceneAnims.Add("launch"); m_cutsceneAnims.Add("angryidle_0"); m_cutsceneAnims.Add("fire"); //setup angry anim list m_angryAnims = new ArrayList(); m_angryAnims.Add("taunt"); m_angryAnims.Add("angryidle_0"); m_angryAnims.Add("stagger"); m_angryAnims.Add("facepalm"); m_angryAnims.Add("launch"); m_angryAnims.Add("fire"); m_lastKnownIdle = ""; m_audio = GetComponent <AudioSource>(); }
void OnAirshipTrigger() { if (m_pingPongFlag) { CEntityAirship.GetInstance().StartCutScene(); CEntityCaptain.GetInstance().StartCutScene(); } }
// 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(); } }
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); } }
// Use this for initialization void Start() { INSTANCE = this; m_state = CaptainState.Idle; m_animation = GetComponentInChildren<Animation>(); //setup cutscene anim list m_cutsceneAnims = new ArrayList(); m_cutsceneAnims.Add("taunt"); m_cutsceneAnims.Add("launch"); m_cutsceneAnims.Add("angryidle_0"); m_cutsceneAnims.Add("fire"); //setup angry anim list m_angryAnims = new ArrayList(); m_angryAnims.Add("taunt"); m_angryAnims.Add("angryidle_0"); m_angryAnims.Add("stagger"); m_angryAnims.Add("facepalm"); m_angryAnims.Add("launch"); m_angryAnims.Add("fire"); m_lastKnownIdle = ""; m_audio = GetComponent<AudioSource>(); }