void Start() { Debug.Log("InitMainMenu Start"); AddNotificationObservers(); ClearGraphics(); ResetDebugText(); RefreshDebugText(); RefreshGoldCount(0); RefreshOilCount(0); RefreshHiScore(); UpdateFBIcon(); PropellerProduct _propellerProductScript = getPropellerProductClass(); _propellerProductScript.updateLoginText(); if (sComingFromTitle == true) { UpdatePropellerSDK(); sComingFromTitle = false; } if (_propellerProductScript.tryLaunchFuelSDK()) { // obtained multiplayer match data // Fuel is being launched to see results if (AutoLauncher.Instance().AutoLaunch()) { // should never get to here // we have an auto launch condition // reset the state since we are already launching AutoLauncher.Instance().SetAutoLaunch(false); } } else { // no multiplayer match data if (AutoLauncher.Instance().AutoLaunch()) { // we have an auto launch condition // process auto launch condition normally AutoLauncher.Instance().SetAutoLaunch(false); GameObject fuelHandlerObject = GameObject.Find("FuelHandlerObject"); FuelHandler fuelHandler = fuelHandlerObject.GetComponent <FuelHandler>(); fuelHandler.launchPropeller(); } } }
public static AutoLauncher Instance() { if (s_instance == null) { s_instance = new AutoLauncher(); } return(s_instance); }
/* * --------------------------------------------------------------------- * Notifications & Deep Linking * --------------------------------------------------------------------- */ public void OnPropellerSDKNotification(string applicationState) { Debug.Log("OnPropellerSDKNotification"); AutoLauncher.Instance().ValidateAutoLauncher(applicationState); }