Esempio n. 1
0
    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;
    }
Esempio n. 2
0
    // 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;
    }
Esempio n. 3
0
    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();
    }