// 主动事件中断等待 public virtual void waitBroken(HumanStuff playerStuff) { dealWithEvent(playerStuff); _eventState = EventState.Stop; _eventSystem.eventClear(ID); _eventSystem.fullBackTheEventStuff(ID); }
private List <int> _postiveEventList = new List <int>(); // 主动触发事件列表 #endregion private void Start() { for (int i = 0; i < stuffList.Count; i++) { BasicStuff stuff = stuffList[i]; stuff.init(this, player); if (stuff.isOrder) { stuff.gameObject.SetActive(false); _postiveEventList.Add(stuff.ID); } _triggedEvent.Add(stuff.ID, stuff.getWaitTime()); } for (int i = 0; i < toolStuffList.Count; i++) { BasicStuff stuff = toolStuffList[i]; stuff.init(this, player); _triggedEvent.Add(stuff.ID, stuff.requireTime); } _timer = TimeLine.getInstance(); // 初始化时间点 _timePointCount = 0; // 起始等待 3 s _timer.setElapseTime(3.0f); _playerStuff = player.getStuffComp(); _triggedEvent.Add(_playerStuff.ID, _playerStuff.requireTime); }
public override void dealWithEvent(HumanStuff playerStuff) { if (_player.hands == HandsState.none) { _tips.setTips("手上没东西可以丢"); } base.dealWithEvent(playerStuff); }
public override void dealWithEvent(HumanStuff playerStuff) { if (_player.hands != HandsState.none) { _tips.setTips("请放下手里的东西再来拿尿布"); return; } base.dealWithEvent(playerStuff); }
// Use this for initialization void Start() { _humanStuff = GetComponent <HumanStuff>(); _controller = new MoveController(this); _seSystem = new SolveEventSystem(this); _animSystem = new HumanAnimation(this); _gameManager = GameManager.getInstance(); Debug.Log(_gameManager); }
public override void waitBroken(HumanStuff playerStuff) { if (_player.hands != HandsState.none) { _tips.setTips("手里还有东西就不能接触宝宝"); return; } base.waitBroken(playerStuff); }
public override void waitBroken(HumanStuff playerStuff) { if (_player.hands != HandsState.keepDiaper) { _tips.setTips("请去拿尿布"); // 播放提示音效 return; } base.waitBroken(playerStuff); }
// 生成抽烟 slider 并且减少压力值 public override void dealWithEvent(HumanStuff playerStuff) { if (_player.hands != HandsState.none) { _tips.setTips("手上还有东西,不能抽烟"); } smokingPic.SetActive(true); _player.gameObject.SetActive(false); base.dealWithEvent(playerStuff); }
// 开始处理事件 public virtual void dealWithEvent(HumanStuff playerStuff) { //Debug.Log("deal With Event"); // 设置消耗时间 playerStuff.requireTime = requireTime; // 设置委托 playerStuff.finishedEvent = finished; // 生成新的 slider _eventSystem.InitNewSlider(playerStuff); // 人物当前不可移动 _player.state = HumanState.isWorking; }
public override void waitBroken(HumanStuff playerStuff) { if (_player.hands != HandsState.none) { _tips.setTips("请放下手中的物品,再接电话"); return; } base.waitBroken(playerStuff); _audio.playTelePhone(false); // 显示轮盘对象 GameManager.getInstance().startTurnGame(_player); }
public override void waitBroken(HumanStuff playerStuff) { if (_schedule == 0) { return; } _player.state = HumanState.isWorking; playerStuff.requireTime = requireTime; _eventSystem.eventClear(ID); dealWithEvent(playerStuff); _eventState = EventState.Stop; }
public override void dealWithEvent(HumanStuff playerStuff) { // 判断当前 scheuld if (_schedule == 0) { _tips.setTips("开始烧水"); waitStart(); _eventSystem.InitNewSlider(this); } else { _eventSystem.InitNewSlider(playerStuff); playerStuff.finishedEvent = finished; } }
public override void dealWithEvent(HumanStuff _playerStuff) { }
public override void dealWithEvent(HumanStuff playerStuff) { base.dealWithEvent(playerStuff); }
public SolveEventSystem(HumanSystem person) { _player = person; _playerStuff = person.getStuffComp(); _tips = TipsManager.getInstance(); }