Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (!isTriggerd && falseGround.IsTouchingLayers(playerLayer))
     {
         TriggerTrap();
     }
     if (isTriggerd && spikesColl.IsTouchingLayers(playerLayer) && !DialogManager.instance.isInDialogue)
     {
         if (dmgTimeStamp <= Time.time)
         {
             player.ApplyHit(damage, Vector2.up * 20, 0);
             dmgTimeStamp = Time.time + damageCooldown;
         }
     }
 }