// public void Reincarnate() // { // p_particle.startColor = SC_PlayerRef.s_Color; // p_particle.Emit(50); // // SC_playerDeathRef = a_DeadPlayers[0].GetComponent<SC_playerDeath>(); // SC_playerDeathRef.Reincarnate(); // a_DeadPlayers.RemoveAt(0); // f_CutOffValue = 1; // renderer.material.SetFloat("_Cutoff", f_CutOffValue ); // b_reincarnateReady = false; // setColor(); // } IEnumerator Reincarnate() { p_particle.startColor = SC_PlayerRef.s_brightColor; p_particle.Emit(50); yield return(new WaitForSeconds(0.2f)); SC_playerDeathRef = a_DeadPlayers[0].GetComponent <SC_playerDeath>(); SC_playerDeathRef.Reincarnate(); a_DeadPlayers.RemoveAt(0); f_CutOffValue = 1; renderer.material.SetFloat("_Cutoff", f_CutOffValue); b_reincarnateReady = false; setColor(); }
void Start() { SC_playerComboRef = this.GetComponent <SC_playerCombo>(); l_lifeLamp = this.transform.FindChild("LifeLamp").light; SC_lifeLampRef = l_lifeLamp.GetComponent <SC_GetColorSprite>(); SC_mainLightRef = GameObject.Find("flashLight_root").GetComponent <SC_mainLight>(); SC_dashTrailRef = this.GetComponent <SC_dashTrail>(); SC_playerDeathRef = this.GetComponent <SC_playerDeath>(); SC_PlayerRef = this.GetComponent <SC_Player>(); c_Color = SC_PlayerRef.s_Color; }
void Start() { _PlayerIndex = (PlayerIndex)(int)playerIndex - 1; _ControllerState = GamePad.GetState(_PlayerIndex); _PlayerAnims = GetComponent <Animator>(); s_PlayerState = "Idle"; s_CurrentAnim = "idle_1"; i_LookingDir = 1; i_CurrentLookDir = 1; f_AttackTime = 0; b_IsInPuMode = false; _Sounds = GameObject.FindGameObjectWithTag("SOUND_MANAGER").GetComponent <SC_SoundManager>(); SC_mainLightRef = GameObject.Find("flashLight_root").GetComponent <SC_mainLight>(); SC_ScoreCounterRef = GameObject.FindGameObjectWithTag("scoreCounter").GetComponent <SC_ScoreCounter>(); _TriggerCaC = this.transform.FindChild("TriggerCac").gameObject; SC_playerComboCounterRef = GameObject.Find("scoreCounterGUI" + (int)playerIndex).GetComponent <SC_playerComboCounter>(); SC_playerComboRef = this.GetComponent <SC_playerCombo>(); SC_playerDeathRef = this.GetComponent <SC_playerDeath>(); SC_closeToEnnemiFBRef = this.GetComponent <SC_closeToEnnemiFB>(); SC_dashTrailRef = GetComponent <SC_dashTrail>(); _Viseur = GameObject.Find("Viseur" + (int)playerIndex).gameObject; _Viseur.renderer.material.color = s_Color; b_HasTouchedForDash = false; b_DashKill = false; Physics.IgnoreLayerCollision(8, 8); this.tag = "Player"; b_IsCaCing = false; b_IsDashing = false; b_CanDash = true; CaCOFF(); p_PUmode.startColor = s_brightColor; _TriggerCaCChild.SetActive(false); stopRumble(); }
public void setColor() { if (a_DeadPlayers.Count > 0) { SC_PlayerRef = a_DeadPlayers[0].GetComponent <SC_Player>(); //a_DeadPlayers[0] SC_playerDeathRef = a_DeadPlayers[0].GetComponent <SC_playerDeath>(); i_regenSpeedBonus = SC_playerDeathRef.i_storedKillCount; c_lifeRegenColor = SC_PlayerRef.s_Color; c_lifeRegenColor.a = 0.5f; renderer.material.color = c_lifeRegenColor; } else { renderer.material.color = Color.white; } }