Example #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() : "";
        }
Example #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;
 }
Example #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);
        }
Example #4
0
 public void UpdateData(NpcData data)
 {
     npcData = data;
 }
Example #5
0
 public void SetNpcData(NpcData data)
 {
     UpdateData(data);
     RefreshView();
 }