Пример #1
0
    public void InitSkillInfo(string _skillName)
    {
        SkillDataManager.SkillInfo skillInfo = SkillDataManager.Inst.GetSkillInfo(_skillName);
        m_skillName.text    = _skillName;
        m_skillImage.sprite = skillInfo.skillImage;
        m_skillLevel.text   = "LV : " + PlayerDataManager.Inst.GetSkillLevelInfo(_skillName).ToString();

        if (PlayerDataManager.Inst.GetPlayerData().level >= skillInfo.levelLimit)
        {
            m_LockObject.SetActive(false);
        }
    }
Пример #2
0
    public virtual void InitSkill(PlayerAnimFuntion _animFuntion, GameObject _playerObject)
    {
        level = PlayerDataManager.Inst.GetSkillLevelInfo(gameObject.name);
        SkillDataManager.SkillInfo skillInfo = SkillDataManager.Inst.GetSkillInfo(gameObject.name);
        skillName     = skillInfo.skillName;
        collisionSize = skillInfo.collisionSize;
        damageRatio   = skillInfo.damageRatio + (level * 5);
        damageForce   = skillInfo.damageForce;

        m_animFuntion         = _animFuntion;
        m_playerState         = _playerObject.GetComponent <PlayerState>();
        m_rigidbody2D         = _playerObject.GetComponent <Rigidbody2D>();
        m_crowdControlManager = _playerObject.GetComponent <PlayerCrowdControlManager>();
    }
Пример #3
0
    public void InitQuickSkill(string _skillname, PlayerInput _playerInput)
    {
        if (_skillname == null)
        {
            return;
        }

        m_skillInfo = SkillDataManager.Inst.GetSkillInfo(_skillname);
        this.GetComponentsInChildren <Image>()[1].enabled = true;
        this.GetComponentsInChildren <Image>()[1].sprite  = m_skillInfo.skillImage;
        coolTime      = m_skillInfo.coolTime;
        m_playerInput = _playerInput;
        m_coolImage   = this.GetComponentsInChildren <Image>()[2];
        m_text        = this.GetComponentInChildren <TextMeshProUGUI>();

        EventTrigger.Entry dounEvent = new EventTrigger.Entry();
        dounEvent.eventID = EventTriggerType.PointerDown;
        dounEvent.callback.AddListener(BaseEventData => SkillAction());

        this.GetComponentInChildren <EventTrigger>().triggers.Add(dounEvent);
    }