Exemple #1
0
    public bool excuteLeaveRoomEvent(RoomInterface ri, Character chara)
    {
        //这个房间有没有离开事件
        eventI = ri.getRoomEvent(EventConstant.LEAVE_EVENT);

        //不为空有事件
        if (eventI != null)
        {
            EventResult result = eventI.excute(chara, null, 0);
            if (result.getResultCode() == EventConstant.LEAVE_EVENT_SAFE)
            {
                return(true);
            }
            else
            {
                chara.updateActionPoint(0);
                return(false);
            }
        }
        else
        {
            //为空没有事件
            //  Debug.Log("没有离开事件");
            return(true);
        }
    }
Exemple #2
0
 public void excuteStayRoomEvent(RoomInterface ri, Character chara)
 {
     this.eventI = ri.getRoomEvent(EventConstant.STAY_EVENT);
     if (this.eventI != null)
     {
         EventInfo ei = new EventInfo();
         ei.RoomXyz = ri.getXYZ();
         ei.EffectedList.Add(chara.getName());
         this.stayEventList.Add(ei);
         eventI.excute(chara, null, 0);
     }
 }
Exemple #3
0
 public bool excuteEnterRoomEvent(RoomInterface ri, Character chara)
 {
     eventI = ri.getRoomEvent(EventConstant.ENTER_EVENT);
     // Debug.LogError(this.eventI);
     if (eventI != null)
     {
         if (eventI.getSubEventType() == EventConstant.SANCHECK_EVENT)
         {
             return(excuteSanCheckEvent(eventI, chara));
         }
         if (eventI.getSubEventType() == EventConstant.FALL_DOWN__EVENT)
         {
             return(excuteFallRoomEvent(eventI, chara));
         }
     }
     Debug.Log(" no san check");
     return(true);
 }
Exemple #4
0
    public void excuteLeaveRoomEvent(DoorInterface door, RoomInterface ri, Character chara)
    {
        //这个房间有没有离开事件
        eventI = ri.getRoomEvent(EventConstant.LEAVE_EVENT);

        //不为空有事件
        if (eventI != null)
        {
            Debug.Log("有离开事件");
            leaveExecuted = false;
            this.ri       = ri;
            this.chara    = chara;
            this.door     = door;
            phase         = 1;
            messageUI.getResult().setDone(false);
            showMessageUi(eventI.getEventBeginInfo(), eventI.getSelectItem());
        }
        else
        {
            //为空没有事件
            Debug.Log("没有离开事件");
            door.playerOpenDoorResult(true);
        }
    }