Beispiel #1
0
    void Start()
    {
        animator        = GetComponent <Animator>();
        JoyStick        = GameObject.Find("Joystick").GetComponent <NGUIJoystick>();
        hitButton       = GameObject.Find("AttckButton").GetComponent <CheaserHitBButton>();
        flashCollision  = GameObject.Find("Cheaser").GetComponent <FlashCollision>();
        cheaserCollider = this.GetComponent <CapsuleCollider>();

        // 스킬 버튼
        chSkillButton1 = GameObject.FindWithTag("CheaserSkillUiButton").GetComponent <ChSkillButton1>();
        chSkillButton2 = GameObject.FindWithTag("CheaserSkillUiButton2").GetComponent <ChSkillButton2>();
        chSkillButton3 = GameObject.FindWithTag("CheaserSkillUiButton3").GetComponent <Skill3Button>();

        // 파티클 제어
        paticleSkill1.Stop();
        paticleSkill2.Stop();
        paticleSkill3.Stop();

        // 쉐이더 변경
        cheaserMesh = this.GetComponentInChildren <SkinnedMeshRenderer>();
    }
 private void Awake()
 {
     chButton1 = GameObject.FindWithTag("CheaserSkillUiButton").GetComponent <ChSkillButton1>();
     chButton3 = GameObject.FindWithTag("CheaserSkillUiButton3").GetComponent <Skill3Button>();
 }