private void doStartAgain() { t_parentRoot = this.transform.parent.gameObject.transform; f_StrenghtRef = SC_PlayerRef.GetPushStrenght(); _MainCam = GameObject.FindWithTag("MainCamera"); SC_playerComboCounterRef = SC_PlayerRef.SC_playerComboCounterRef; }
// Use this for initialization void Start() { _Sounds = GameObject.FindGameObjectWithTag("SOUND_MANAGER").GetComponent<SC_SoundManager>(); SC_PlayerRef = this.GetComponent<SC_Player>(); SC_playerComboCounterRef = SC_PlayerRef.SC_playerComboCounterRef; SC_ScoreCounterRef = GameObject.Find("guiSCOREcounter").GetComponent<SC_ScoreCounter>(); SC_PlayerRef = GetComponent<SC_Player>(); SC_PlayerComboRef = GetComponent<SC_playerCombo>(); //POUR LE DASHFIRE SC_dashTrailRef = GetComponent<SC_dashTrail>(); f_initialDashFade = SC_PlayerRef.f_TrailfadeOutSpeed; f_initialTrailSpeed = SC_dashTrailRef.f_TrailSpeed; }
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(); }