/// <summary> /// Determines whether area roomPartition has active gate. /// </summary> /// <returns><c>true</c> if there is active gate at the specified area roomPartition; otherwise, <c>false</c>.</returns> public bool HasActiveGate(string zone, int localParition) { bool isActive = false; ImmutableDataGate data = DataLoaderGate.GetData(zone, localParition); if (data != null) { isActive = DataManager.Instance.GameData.GatingProgress.IsGateActive(data.GateID); } return(isActive); }
/// <summary> /// Determines whether the player can enter room. /// </summary> /// <returns><c>true</c> if player can enter room ie player is moving from a smog room; otherwise, <c>false</c>.</returns> /// <param name="currentRoom">Current room.</param> /// <param name="eSwipeDirection">E swipe direction.</param> public bool CanEnterRoom(int currentLocalPartition, RoomDirection swipeDirection) { // start off optimistic bool isAllowed = true; // if there is an active gate in this room, check to see if it is blocking the direction the player is trying to go in ImmutableDataGate dataGate = DataLoaderGate.GetData(currentZone, currentLocalPartition); if (dataGate != null && DataManager.Instance.GameData.GatingProgress.IsGateActive(dataGate.GateID) && dataGate.DoesBlock(swipeDirection)) { isAllowed = false; } return(isAllowed); }
protected float maxScreenSpace; // the max screen space the gate covers with 100% HP protected ImmutableDataGate GetGateData() { ImmutableDataGate data = DataLoaderGate.GetData(gateID); return(data); }