예제 #1
0
 private void Init()
 {
     if (dialogueStructData == null)
     {
         dialogueStructData = DataCenter.Instance.GetMetaData <DialogueStructData>();
     }
     if (runtimeTasksData == null)
     {
         runtimeTasksData = DataCenter.Instance.GetEntity <TaskMap.RunTimeTaskData>();
     }
     if (iInteractiveState == null)
     {
         iInteractiveState = GameState.Instance.GetEntity <IInteractiveState>();
     }
     if (iNowTaskState == null)
     {
         iNowTaskState = GameState.Instance.GetEntity <INowTaskState>();
     }
     if (iGameState == null)
     {
         iGameState = GameState.Instance.GetEntity <IGameState>();
     }
     if (iNPCSpriteState == null)
     {
         iNPCSpriteState = GameState.Instance.GetEntity <INPCSpriteState>();
     }
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        runTimeTaskData = new RunTimeTaskData();
        runTimeTaskData.OnDeserializedMethod(default(StreamingContext));
        List <TaskMap.RunTimeTaskInfo> runtimeTaskInfos = runTimeTaskData.GetAllToDoList();

        foreach (var item in runtimeTaskInfos)
        {
            item.IsStart = true;
            item.IsOver  = true;
        }
        runtimeTaskInfos = runTimeTaskData.GetAllToDoList();
        foreach (var item in runtimeTaskInfos)
        {
            item.IsStart = true;
            item.IsOver  = true;
        }
        runtimeTaskInfos = runTimeTaskData.GetAllToDoList();
        foreach (var item in runtimeTaskInfos)
        {
            if (item.ID == 4)
            {
                item.IsStart = true;
                item.IsOver  = true;
            }
        }
        DebugNowState();
    }
예제 #3
0
 void Start()
 {
     verticalLayoutGroup = GetComponent <VerticalLayoutGroup>();
     iNowTaskState       = GameState.Instance.GetEntity <INowTaskState>();
     iMapState           = GameState.Instance.GetEntity <IMapState>();
     GameState.Instance.Registor <INowTaskState>(INowTaskStateChanged);
     GameState.Instance.Registor <IMapState>(IMapStateChanged);
     runTimeTasksData = DataCenter.Instance.GetEntity <TaskMap.RunTimeTaskData>();
     ShowNowTask();
 }
예제 #4
0
 void Start()
 {
     npcIDToTalkShowStructDic = new Dictionary <int, TalkShowStruct>();
     npcIDToShowObjDic        = new Dictionary <int, GameObject>();
     iInteractiveState        = GameState.Instance.GetEntity <IInteractiveState>();
     dialogueStructData       = DataCenter.Instance.GetMetaData <DialogueStructData>();
     runtimeTasksData         = DataCenter.Instance.GetEntity <TaskMap.RunTimeTaskData>();
     iGameState  = GameState.Instance.GetEntity <IGameState>();
     playerState = DataCenter.Instance.GetEntity <PlayerState>();
     npcData     = DataCenter.Instance.GetMetaData <NPCData>();
 }
예제 #5
0
 private void OnEnable()
 {
     dialogueStructData = DataCenter.Instance.GetMetaData <DialogueStructData>();
     runtimeTasksData   = DataCenter.Instance.GetEntity <TaskMap.RunTimeTaskData>();
     iInteractiveState  = GameState.Instance.GetEntity <IInteractiveState>();
     iNowTaskState      = GameState.Instance.GetEntity <INowTaskState>();
     iGameState         = GameState.Instance.GetEntity <IGameState>();
     iGameState.PushEnumGameRunType(EnumGameRunType.TaskTalk);
     showItemList = new List <Transform>();
     UIManager.Instance.KeyUpHandle += Instance_KeyUpHandle;
     InitTalk();
 }
 public DataCenter()
 {
     PlayerState                = new PlayerState();
     KeyConatactData            = new KeyContactData();
     RuntimeTasks               = new RuntimeTasksData();
     gameRunnedState            = new GameRunnedState();
     RuntimeTaskMap             = new TaskMap.RunTimeTaskData();
     BusinessmanStates          = new BusinessmanStates();
     GameRunningStaetData       = new GameRunningStateData();
     ActionInteractiveStateData = new ActionInteractiveStateData();
     SceneStateDatas            = new SceneStateDatas();
 }
예제 #7
0
 private void Start()
 {
     if (NPCDataInfo != null)
     {
         if (NPCDataInfo.NPCShowCondition != null)
         {
             NPCDataInfo.NPCShowCondition.TimeRangePath        = true;
             NPCDataInfo.NPCShowCondition.TaskCoditionHidePath = false;
             NPCDataInfo.NPCShowCondition.TaskCoditionShowPath = true;
         }
     }
     if (GameState.Instance != null)
     {
         GameState.Instance.Registor <INowTaskState>(CheckTask);
         runTimeTaskData = DataCenter.Instance.GetEntity <TaskMap.RunTimeTaskData>();
         CheckTask(GameState.Instance.GetEntity <INowTaskState>());
     }
 }
예제 #8
0
 private void Init()
 {
     if (runtimeTasksData == null)
     {
         runtimeTasksData = DataCenter.Instance.GetEntity <TaskMap.RunTimeTaskData>();
     }
     if (iInteractiveState == null)
     {
         iInteractiveState = GameState.Instance.GetEntity <IInteractiveState>();
     }
     if (iNowTaskState == null)
     {
         iNowTaskState = GameState.Instance.GetEntity <INowTaskState>();
     }
     if (iGameState == null)
     {
         iGameState = GameState.Instance.GetEntity <IGameState>();
     }
 }