public static bool PortalStatus(GameStatics.PORTAL_TYPE portalType) { switch (portalType) { case GameStatics.PORTAL_TYPE.STAGE1_1: return((portal_stage1_1 == 0) ? false : true); case GameStatics.PORTAL_TYPE.STAGE2_1: return((portal_stage2_1 == 0) ? false : true); case GameStatics.PORTAL_TYPE.STAGE3_1: return((portal_stage3_1 == 0) ? false : true); default: return(false); } }
public static void SetPortalStatus(GameStatics.PORTAL_TYPE portalType, bool isOn) { int isOnInt = (isOn) ? 1 : 0; switch (portalType) { case GameStatics.PORTAL_TYPE.STAGE1_1: ObscuredPrefs.SetInt(GameStatics.PREFS_PORTAL_Stage1_1, isOnInt); portal_stage1_1 = isOnInt; if (isOn) { Firebase.Analytics.FirebaseAnalytics.LogEvent(GameStatics.EVENT_OPEN_PORTAL_STAGE1); } break; case GameStatics.PORTAL_TYPE.STAGE2_1: ObscuredPrefs.SetInt(GameStatics.PREFS_PORTAL_Stage2_1, isOnInt); portal_stage2_1 = isOnInt; if (isOn) { Firebase.Analytics.FirebaseAnalytics.LogEvent(GameStatics.EVENT_OPEN_PORTAL_STAGE2); } break; case GameStatics.PORTAL_TYPE.STAGE3_1: ObscuredPrefs.SetInt(GameStatics.PREFS_PORTAL_Stage3_1, isOnInt); portal_stage3_1 = isOnInt; if (isOn) { Firebase.Analytics.FirebaseAnalytics.LogEvent(GameStatics.EVENT_OPEN_PORTAL_STAGE3); } break; default: break; } }