예제 #1
0
    // Start is called before the first frame update
    private void Start()
    {
        if (m_Player == null)
        {
            m_Player = GameObject.Find("Player");
        }

        m_playerInput   = m_Player.GetComponent <PlayerInput>();
        m_playerEvasion = m_Player.GetComponent <PlayerEvasion>();

        JoyStickConnect();
        NormalAttackConnect();
        JumpConnect();
        EvasionConnect();

        int playerLevel = PlayerDataManager.Inst.GetPlayerData().level;

        string[] skillNames = SkillDataManager.Inst.GetSkillNames();
        for (int i = 0; i < skillNames.Length; ++i)
        {
            if (i >= skillQuicks.Length)
            {
                break;
            }

            if (playerLevel >= SkillDataManager.Inst.GetSkillInfo(skillNames[i]).levelLimit)
            {
                skillQuicks[i].InitQuickSkill(skillNames[i], m_playerInput);
            }
        }
    }
예제 #2
0
 void Start()
 {
     rb            = GetComponent <Rigidbody2D> ();
     sr            = GetComponent <SpriteRenderer> ();
     healthManager = GetComponent <Health> ();
     dash          = GetComponent <PlayerEvasion> ();
     attack        = GetComponent <PlayerCombat> ();
     anim          = GetComponent <Animator> ();
     portrait      = sr.sprite;
 }
예제 #3
0
 void Start()
 {
     m_playerState        = this.GetComponent <PlayerState>();
     m_characterMove      = this.GetComponent <CharacterMove>();
     m_characterJump      = this.GetComponent <CharacterJump>();
     m_animFuntion        = this.GetComponentInChildren <PlayerAnimFuntion>();
     m_skillManager       = this.GetComponentInChildren <SkillManager>();
     m_playerNormalAttack = this.GetComponent <PlayerNormalAttack>();
     m_playerEvasion      = this.GetComponent <PlayerEvasion>();
     m_playerInfo         = this.GetComponent <PlayerInfo>();
     m_audioFunction      = this.GetComponent <AudioFunction>();
 }