Esempio n. 1
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
         EndDay();
     }
 }
Esempio n. 2
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         ChangeSeasons();
     }
 }
Esempio n. 3
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         GameDataBean gameData = GameDataHandler.Instance.manager.GetGameData();
         ClearNpc();
         listExistNpcId.Clear();
         listExistTeamId.Clear();
         //更新数据
         listRascal = NpcTeamHandler.Instance.manager.GetRandomTeamMeetConditionByType(NpcTeamTypeEnum.Rascal, gameData);
         listSundry = NpcTeamHandler.Instance.manager.GetRandomTeamMeetConditionByType(NpcTeamTypeEnum.Sundry, gameData);
         listFriend = NpcTeamHandler.Instance.manager.GetRandomTeamMeetConditionByType(NpcTeamTypeEnum.Friend, gameData);
         listConvert.Clear();
         listConvert.AddRange(NpcTeamHandler.Instance.manager.GetRandomTeamMeetConditionByType(NpcTeamTypeEnum.Entertain, gameData));
         listConvert.AddRange(NpcTeamHandler.Instance.manager.GetRandomTeamMeetConditionByType(NpcTeamTypeEnum.Disappointed, gameData));
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
         ClearNpc();
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.TimePoint)
     {
         if (timeHour >= 9 && timeHour <= 20)
         {
             StartEvent();
         }
     }
 }
Esempio n. 4
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         InitRecord();
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
     }
 }
Esempio n. 5
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         //初始化场景
         GameDataBean    gameData        = GameDataHandler.Instance.manager.GetGameData();
         InnBuildBean    innBuildData    = gameData.GetInnBuildData();
         SceneInnManager sceneInnManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneInnManager>();
         sceneInnManager.InitScene(innBuildData.innWidth, innBuildData.innHeight);
         //StartCoroutine(CoroutineForBuildNavMesh());
     }
 }
Esempio n. 6
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         InitNewDay();
         //重新烘培场景
         StartCoroutine(BuildNavMesh());
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
         CleanInnData();
     }
 }
Esempio n. 7
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         SetAllLightStatus(false);
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.TimePoint)
     {
         if (timeHour == openLightTime)
         {
             SetAllLightStatus(true);
         }
     }
 }
Esempio n. 8
0
 /// <summary>
 /// 时间回调
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="observable"></param>
 /// <param name="type"></param>
 /// <param name="obj"></param>
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         ClearNpc();
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
         ClearNpc();
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.TimePoint)
     {
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.StartRest)
     {
         BuildFamily();
     }
 }
Esempio n. 9
0
 /// <summary>
 /// 时间回调
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="observable"></param>
 /// <param name="type"></param>
 /// <param name="obj"></param>
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         ClearNpc();
         //重新获取顾客信息
         GameDataBean gameData = GameDataHandler.Instance.manager.GetGameData();
         listTeamCustomer = NpcTeamHandler.Instance.manager.GetRandomTeamMeetConditionByType(NpcTeamTypeEnum.Customer, gameData);
         //开始建造顾客
         StartBuildCustomer();
         HandleNpcBuildTime(6);
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
         StopBuildCustomer();
         //ClearNpc();
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.TimePoint)
     {
         HandleNpcBuildTime((int)timeHour);
     }
 }