Пример #1
0
 void Start()
 {
     characterBase = FindObjectOfType <CharacterBase>();
     dust          = CentralData.GetInst().dust;
     playerHealth  = maxHp;
     uIBarControl.SetMaxHealth(maxHp);    //UI身上的血條
     healthbarongame.SetMaxHealth(maxHp); //人物身上的血條
     RD = GetComponent <Rigidbody>();
 }
Пример #2
0
    public virtual void Start()
    {
        characterBase = FindObjectOfType <CharacterBase>();
        skillBase     = FindObjectOfType <SkillBase>();

        collider  = GetComponent <Collider>();
        rigidbody = GetComponent <Rigidbody>();
        if (audioSource == null)
        {
            audioSource = GetComponent <AudioSource>();
        }
        healthBarOnGame = GetComponentInChildren <HealthBarOnGame>();

        Hp = maxHp;
        healthBarOnGame.SetMaxHealth(maxHp);
    }