public override bool Execute() { if (base.Execute()) { SM.SceneRoom curRoom = SM.RandomRoomLevel.Singleton.LookupRoom(RoomGUID); if (null == curRoom) { return(false); } foreach (var item in mGateDataList) { switch (item.mGateType) { case ENGateType.specifiedGate: SM.Gate gate = curRoom.CurRoomInfo.GetGate(item.mGateId); if (gate.isGateOpen) { if (gate.OutIsActive != item.mGateAction) { curRoom.RoomOperateGate(gate, gate.gateDirectionIndex, item.mGateAction); } } break; default: break; } } return(true); } return(false); }
public override bool Execute() { if (IsEnabled) { SM.SceneRoom room = SM.RandomRoomLevel.Singleton.LookupRoom(RoomGUID); SM.Gate gate = room.GetGateByID(gateId); room.RoomOperateGate(gate, gate.gateDirectionIndex, gateActive); } return(true); }