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(); }
void Start() { //_Player = this.gameObject; SC_BatimentChoiceRef = this.GetComponent <SC_BatimentChoice>(); l_LifeLamp = transform.Find("LifeLamp").light; f_LifeAmountMax = f_LifeAmount; f_LifeLampMax = l_LifeLamp.spotAngle; //v_StartPos = transform.position; v_respawnPoint = GameObject.FindGameObjectWithTag("respawnPoint").transform.position; v_respawnPoint = new Vector3(v_respawnPoint.x, v_respawnPoint.y, transform.position.z); //SC_playerComboCounterRef = this.GetComponent<SC_playerComboCounter>(); SC_ScoreCounterRef = GameObject.FindGameObjectWithTag("scoreCounter").GetComponent <SC_ScoreCounter>(); SC_PlayerRef = this.GetComponent <SC_Player>(); SC_mainLightRef = GameObject.Find("flashLight_root").GetComponent <SC_mainLight>(); _deathColor = SC_PlayerRef.s_Color; }