コード例 #1
0
ファイル: BasicStuff.cs プロジェクト: ColinCollins/BabySite
 // 主动事件中断等待
 public virtual void waitBroken(HumanStuff playerStuff)
 {
     dealWithEvent(playerStuff);
     _eventState = EventState.Stop;
     _eventSystem.eventClear(ID);
     _eventSystem.fullBackTheEventStuff(ID);
 }
コード例 #2
0
    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);
    }
コード例 #3
0
 public override void dealWithEvent(HumanStuff playerStuff)
 {
     if (_player.hands == HandsState.none)
     {
         _tips.setTips("手上没东西可以丢");
     }
     base.dealWithEvent(playerStuff);
 }
コード例 #4
0
ファイル: Forcer.cs プロジェクト: ColinCollins/BabySite
 public override void dealWithEvent(HumanStuff playerStuff)
 {
     if (_player.hands != HandsState.none)
     {
         _tips.setTips("请放下手里的东西再来拿尿布");
         return;
     }
     base.dealWithEvent(playerStuff);
 }
コード例 #5
0
ファイル: HumanSystem.cs プロジェクト: ColinCollins/BabySite
 // 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);
 }
コード例 #6
0
ファイル: Playing.cs プロジェクト: ColinCollins/BabySite
 public override void waitBroken(HumanStuff playerStuff)
 {
     if (_player.hands != HandsState.none)
     {
         _tips.setTips("手里还有东西就不能接触宝宝");
         return;
     }
     base.waitBroken(playerStuff);
 }
コード例 #7
0
 public override void waitBroken(HumanStuff playerStuff)
 {
     if (_player.hands != HandsState.keepDiaper)
     {
         _tips.setTips("请去拿尿布");
         // 播放提示音效
         return;
     }
     base.waitBroken(playerStuff);
 }
コード例 #8
0
 // 生成抽烟 slider 并且减少压力值
 public override void dealWithEvent(HumanStuff playerStuff)
 {
     if (_player.hands != HandsState.none)
     {
         _tips.setTips("手上还有东西,不能抽烟");
     }
     smokingPic.SetActive(true);
     _player.gameObject.SetActive(false);
     base.dealWithEvent(playerStuff);
 }
コード例 #9
0
ファイル: BasicStuff.cs プロジェクト: ColinCollins/BabySite
 // 开始处理事件
 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;
 }
コード例 #10
0
 public override void waitBroken(HumanStuff playerStuff)
 {
     if (_player.hands != HandsState.none)
     {
         _tips.setTips("请放下手中的物品,再接电话");
         return;
     }
     base.waitBroken(playerStuff);
     _audio.playTelePhone(false);
     // 显示轮盘对象
     GameManager.getInstance().startTurnGame(_player);
 }
コード例 #11
0
ファイル: BoiledWater.cs プロジェクト: ColinCollins/BabySite
 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;
 }
コード例 #12
0
ファイル: BoiledWater.cs プロジェクト: ColinCollins/BabySite
 public override void dealWithEvent(HumanStuff playerStuff)
 {
     // 判断当前 scheuld
     if (_schedule == 0)
     {
         _tips.setTips("开始烧水");
         waitStart();
         _eventSystem.InitNewSlider(this);
     }
     else
     {
         _eventSystem.InitNewSlider(playerStuff);
         playerStuff.finishedEvent = finished;
     }
 }
コード例 #13
0
ファイル: HumanStuff.cs プロジェクト: ColinCollins/BabySite
 public override void dealWithEvent(HumanStuff _playerStuff)
 {
 }
コード例 #14
0
 public override void dealWithEvent(HumanStuff playerStuff)
 {
     base.dealWithEvent(playerStuff);
 }
コード例 #15
0
 public SolveEventSystem(HumanSystem person)
 {
     _player      = person;
     _playerStuff = person.getStuffComp();
     _tips        = TipsManager.getInstance();
 }