Esempio n. 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;
 }
Esempio n. 2
0
File: NPC.cs Progetto: kayorga/3DSP
 public static int compareUpward(NPC npc1, NPC npc2)
 {
     if (npc1.active && !npc2.active) return -1;
     else return npc1.DistanceToPlayer.CompareTo(npc2.DistanceToPlayer);
 }