float tempArmor        = 0; // temporary armor that armor gains after being hit, to reduce instagib scenarios
 void Awake()
 {
     initialDeltaTime   = Time.fixedDeltaTime;
     currBreakThreshold = initBreakThreshold;
     if (flashRed)
     {
         FD = GetComponent <FlashDamage>();
     }
     listOfDmgSparks = GameObject.Find("ListOfDmgSparks");
     if (!dmgSpark)
     {
         dmgSpark = listOfDmgSparks.transform.GetChild(0).gameObject;
     }
 }
 private void Start()
 {
     damageEffect = GetComponentInChildren <FlashDamage>();
     health       = GameManager.instance.PlayerHealth;
 }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     _damageEffect = GetComponent <FlashDamage>();
     _rb           = GetComponent <Rigidbody2D>();
 }