Esempio n. 1
0
        public void UpdateData(TaskData data)
        {
            taskData = data;
            scene    = JsonManager.GetInstance().GetMapping <SceneData>("Scenes", taskData.BelongToSceneId);
            npc      = JsonManager.GetInstance().GetMapping <NpcData>("Npcs", taskData.BelongToNpcId);
            JObject areaNames = JsonManager.GetInstance().GetJson("AreaNames");

            areaName = areaNames[scene.BelongToAreaName] != null ? areaNames[scene.BelongToAreaName]["Name"].ToString() : "";
        }
Esempio n. 2
0
 public void UpdateData(TaskData data)
 {
     taskData      = data;
     currentDialog = taskData.GetCurrentDialog();
     scene         = JsonManager.GetInstance().GetMapping <SceneData>("Scenes", taskData.BelongToSceneId);
     npc           = JsonManager.GetInstance().GetMapping <NpcData>("Npcs", taskData.BelongToNpcId);
     areaNames     = JsonManager.GetInstance().GetJson("AreaNames");
     areaName      = areaNames[scene.BelongToAreaName] != null ? areaNames[scene.BelongToAreaName]["Name"].ToString() : "";
     EventTriggerListener.Get(ScoutBtn.gameObject).onClick = onClick;
 }
Esempio n. 3
0
        void createNpcContainer(NpcData npc)
        {
            if (prefabObj == null)
            {
                prefabObj = Statics.GetPrefab("Prefabs/UI/GridItems/NpcItemContainer");
            }
            GameObject itemPrefab = Statics.GetPrefabClone(prefabObj);

            itemPrefab.name = npc.Id;
            MakeToParent(npcsGrid.transform, itemPrefab.transform);
            NpcContainer container = itemPrefab.GetComponent <NpcContainer>();

            container.SetNpcData(npc);
            npcContainersMapping.Add(npc.Id, container);
        }
Esempio n. 4
0
 public void UpdateData(NpcData data)
 {
     npcData = data;
 }
Esempio n. 5
0
 public void SetNpcData(NpcData data)
 {
     UpdateData(data);
     RefreshView();
 }