private void PlayCustomAnimation(DieCausesType type) { string animationName = "DEATH."; float delay = 0.0f; switch (type) { case DieCausesType.Drown: animationName += "AC_Lev_Forest_Dead_Drown"; break; case DieCausesType.Fall: case DieCausesType.DeepShadow: animationName += "AC_Lev_Forest_Dead_Drop_Fall"; break; case DieCausesType.EatenByAtatar: animationName += "AC_Lev_NoGauntlet_Atatar_Dead1_Facing"; animationName += levController.facingDirection.ToString(); delay = 0.2f; break; case DieCausesType.Rock: animationName += "AC_Lev_Dead_Generic"; break; case DieCausesType.Moluvusha: animationName += "AC_Lev_Forest_Moluvusha_Dead"; break; } levController.playCustomAnimation(animationName, delay); }
protected void LevPlayCustomAnimation(DieCausesType causes) { LevDeathAnimationHandler lev = MainObjectSingleton.shared(MainObjectType.Player).GetComponent <LevDeathAnimationHandler>(); lev.GetComponent <LevController> ().levInteractionController.throwPickedObject(Vector3.zero); //drop picked object lev.Die(causes); }
public void Die(DieCausesType causes) { this.causes = causes; levController.setInputEnable(false); levController.stopMoving(); PlayCustomAnimation(causes); }
// private GameObject CreateCameraPrefab() // { // GameObject cameraFXDieObject = GameObject.FindWithTag("GameOverCamera"); // cameraFXDieObject.GetComponent<Camera>().enabled = true; // // cameraFXDieObject.transform.SetAsLastSibling(); // return cameraFXDieObject; // } protected string GetLastWord(DieCausesType type) { string key = "DeathLine."; switch (type) { case DieCausesType.Fall: key += "Fall"; break; case DieCausesType.Drown: key += "Drown"; break; case DieCausesType.Phylex: key += "Phylex"; break; case DieCausesType.Moluvusha: key += "Moluvusha"; break; case DieCausesType.DeepShadow: key += "Hole"; break; case DieCausesType.EatenByAtatar: key += "Atatar"; break; case DieCausesType.Rock: key += "Rock"; break; } return(GetWordSet(key).Random()); }