void Start() { deformer = GetComponent <MeshDeformer>(); currentHP = maxHP; hpBar.ResetBar(maxHP, 1f); if (deathParticlePrefab != null) { deathParticle = Instantiate(deathParticlePrefab, this.transform); deathParticle.transform.localPosition = centerPosition.localPosition; deathParticle.gameObject.SetActive(false); } }
protected override void Start() { Debug.Log("HP compo Start!"); base.Start(); currentMP = maxMP; if (hpBarUI) { hpBarUI.ResetBar(maxHP, 1f, mc.McData.healthRecoverPerSec); } if (enegyBarUI) { enegyBarUI.ResetBar(maxMP, 1f, mc.McData.enegyRecoverPerSec); } }