Ejemplo n.º 1
0
    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();
            }
        }
    }
    void OnMouseOver()
    {
        if (Input.GetMouseButtonDown(0))
        {
            GameObject  _fuelHandler       = GameObject.Find("FuelHandlerObject");
            FuelHandler _fuelHandlerScript = _fuelHandler.GetComponent <FuelHandler>();

            _fuelHandlerScript.launchPropeller();
        }
    }
    void OnMouseOver()
    {
        if (Input.GetMouseButtonDown(0))
        {
            clickSound.Play();

            GameObject  _fuelHandler       = GameObject.Find("FuelHandlerObject");
            FuelHandler _fuelHandlerScript = _fuelHandler.GetComponent <FuelHandler>();

            gameObject.GetComponent <SpriteRenderer>().sprite = imgDown;

            _fuelHandlerScript.launchPropeller();
        }
    }