예제 #1
0
 void RandomNewNPC(NPCSO npcSO)
 {
     //Debug.Log("Random a npc");
     GlobalControl.Instance.npcPos = new Vector3(0, 0, 0);
     GlobalControl.Instance.npcDir = Random.insideUnitCircle;
     npcSO.timeLimit = timerSO.round;
 }
예제 #2
0
파일: Encounter.cs 프로젝트: jacoba4/RaidTA
    public void AddNewNPC(int npc_id, Vector3 location)
    {
        if (npc_id < 0 || npc_id >= npc_db.npcs.Length)
        {
            return;
        }

        NPCSO npc = npc_db.npcs[npc_id];

        npc_list.Add(Instantiate(npc.npc_prefab, location, Quaternion.identity).GetComponent <NPC>());
        npc_list[npc_list.Count - 1].encounter = this;
        npc_list[npc_list.Count - 1].name      = npc.name;
        npc_list[npc_list.Count - 1].InitTable(raid_manager.unit_list);
    }