void Start() { instance = this; heartStack = new Stack <GameObject>(); Recover(maxHp); player = GameObject.FindGameObjectWithTag("Player"); }
private void Awake() { sonucPanel.GetComponent <RectTransform>().localScale = Vector3.zero; kalanhp = 3; hp = Object.FindObjectOfType <HpManager>(); hp.KalanHitPoint(kalanhp); rm = Object.FindObjectOfType <ResultManager>(); audioSource = GetComponent <AudioSource>(); }
void Start() { MainCamera.cam.transform.position = new Vector3(0f, 0f, -10f); HpManager.Init(); if (StoneManager.stone < 20) { StoneManager.stone = 20; StoneManager.ReloadStone(0); } delay = 2f; SoundBackground.Stop(); }
void LostHp(int n) { if (HpManager.LostHp(n)) { Dead(); return; } isImmune = true; isShowSprite = true; timerImmune = 1f; SoundEffect.PlayLostHp(); }
private void OnTriggerEnter2D(Collider2D collision) { if (isVisible) { if (collision.CompareTag(tagPlayer)) { HpManager.IncreaseMaxHp(); Destroy(parent); SoundEffect.PlayEatPhoenix(); } } else { if (collision.CompareTag(tagBullet)) { isVisible = true; spriteRenderer.sprite = sprite; Destroy(collision.gameObject); SoundEffect.PlayItemShow(); } } }
private void Awake() { hpManager = GetComponent <HpManager>(); hpManager.OnDestroyCallback += GameOver; }
private void Awake() { hpManager = GetComponent <HpManager>(); }
private void Start() { HpManager.ResetReload(); delay = 2f; }
// Use this for initialization void Start() { towerRightHP = 1000; towerRight = GameObject.Find("TowerRight"); hpManager = GetComponent <HpManager>(); }
void Start() { hp = new HpManager(100f); }
private void Awake() { instance = this; }
private void Awake() { attackManager = GetComponent <AttackManager>(); hpManager = GetComponent <HpManager>(); }
private void Awake() { hpManager = GetComponent <HpManager>(); goldManager = GetComponent <GoldMine>(); }