Пример #1
0
 private void getHit(NPC npc)
 {
     //RAW DAMAGE//
     int dmg = 1 + (int)(npc.lv * npc.speed * 50);
     //////////////
     gotHit = true;
     health = Math.Max(health - dmg, 0);
     invincibleTimer = Constants.PLAYER_NPC_INVINCIBILITY;
     hitDelay = maxHitDelay;
 }
Пример #2
0
 public static int compareUpward(NPC npc1, NPC npc2)
 {
     if (npc1.active && !npc2.active) return -1;
     else return npc1.DistanceToPlayer.CompareTo(npc2.DistanceToPlayer);
 }