void OnGUI()
    {
        rect.x = 20;
        rect.y = 40;

        rect.width  = Screen.width * 0.3f;
        rect.height = Screen.height * 0.1f;
        // Make the Enable Button
        if (GUI.Button(rect, "Enable"))
        {
            AdvertisementHandler.EnableAds();
        }

        rect.y = rect.y + rect.height;
        if (GUI.Button(rect, "Disable"))
        {
            AdvertisementHandler.DisableAds();
        }

        rect.y = rect.y + rect.height;
        // Make the Hide Button
        if (GUI.Button(rect, "Hide"))
        {
            AdvertisementHandler.HideAds();
        }

        rect.y = rect.y + rect.height;
        // Make the Show button.
        if (GUI.Button(rect, "Show"))
        {
            AdvertisementHandler.ShowAds();
        }
    }
Ejemplo n.º 2
0
 void Start()
 {
     LevelDone    = 0;
     textuerMover = 0;
     StartCoroutine(ProgressBar(0));
     orignalWidth  = Screen.width;
     orignalHeight = Screen.height;
     AdvertisementHandler.EnableAds();
     AdvertisementHandler.ShowAds();
 }
    // Use this for initialization
    void Start()
    {
        Debug.Log("Unity Calling Start");
        Debug.Log("Initializing with " +
                  "  Pub ID: " + m_publisherId +
                  "  Adv Size: " + m_advSize +
                  "  Orientation: " + m_orientation +
                  "  Position 1: " + m_positionOne +
                  "  Position 2: " + m_positionTwo +
                  "  IsTesting: " + m_isTesting +
                  "  DeviceID: " + m_testDeviceId +
                  "  AnimIn: " + m_animationInType +
                  "  AnimOut: " + m_animationOutType +
                  "  LevelOfDebug: " + m_levelOfDebug
                  );

        //Initializing Plugin with values
        AdvertisementHandler.Instantiate(m_publisherId, m_advSize, m_orientation, m_positionOne, m_positionTwo, m_isTesting, m_testDeviceId, m_animationInType, m_animationOutType, m_levelOfDebug);

        //Shoot request to enable advertisements
        AdvertisementHandler.EnableAds();
    }