private void Awake() { if (!Instance) { Instance = this; } }
public Npc(NpcHolder npcHolder, SpawnHolder spawnHolder) { this.npcHolder = npcHolder; this.spawnHolder = spawnHolder; SetCurrentHp(npcHolder.GetHp()); // TODO: Implement Creature stats holder. SetLocation(spawnHolder.GetLocation()); }
public static Npc SpawnNpc(int npcId, LocationHolder location, int respawnDelay) { NpcHolder npcHolder = NpcData.GetNpcHolder(npcId); SpawnHolder spawn = new SpawnHolder(location, respawnDelay); Npc npc = null; switch (npcHolder.GetNpcType()) { case NpcType.NPC: npc = new Npc(npcHolder, spawn); break; case NpcType.MONSTER: npc = new Monster(npcHolder, spawn); break; } return(npc); }
public Monster(NpcHolder npcHolder, SpawnHolder spawnHolder) : base(npcHolder, spawnHolder) { }