Exemplo n.º 1
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
         EndDay();
     }
 }
Exemplo n.º 2
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         ChangeSeasons();
     }
 }
Exemplo 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();
         }
     }
 }
Exemplo n.º 4
0
 public void NotifyForTime(GameTimeHandler.NotifyTypeEnum notifyType, float timeHour)
 {
     if (notifyType == GameTimeHandler.NotifyTypeEnum.NewDay)
     {
         InitRecord();
     }
     else if (notifyType == GameTimeHandler.NotifyTypeEnum.EndDay)
     {
     }
 }
Exemplo 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());
     }
 }
Exemplo 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();
     }
 }
Exemplo 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);
         }
     }
 }
Exemplo 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();
     }
 }
Exemplo 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);
     }
 }