Exemplo n.º 1
0
        public static void Create(Vector3 position, int damageAmount, bool isCriticalHit)
        {
            var combatManager = FindObjectOfType <CombatManager>();

            GameObject damagePopupTransform = Instantiate(combatManager.DamagePopupPrefab, new Vector3(position.x, position.y + .7f), Quaternion.identity);

            DamagePopup damagePopup = damagePopupTransform.GetComponent <DamagePopup>();

            damagePopup.Setup(damageAmount, isCriticalHit);
        }
Exemplo n.º 2
0
 public void ShowDamagePopup()
 {
     DamagePopup.Create(transform.position, damage, criticalHit);
 }