Example #1
0
 private void initialize()
 {
     guiElem         = GetComponent <GUICustomElement>();
     _screenBounds.x = -1f;  // initialize the screen bounds cache
     setupButtons();         // locate the buttons
     EffectPrioritizerHelper.registerAsEndEffect(this as IEffectListener);
 }
Example #2
0
    private float screenYdisplacement = 8;     // pixels

    void Awake()
    {
        EffectPrioritizerHelper.registerAsEndEffect(this as IEffectListener);

        swipeCtrl         = GetComponent <SwipeGesture>();
        swipeCtrl.enabled = false;

        gamepad = GetComponent <Gamepad>();
    }
 void Awake()
 {
     // initialize the screen bounds cache
     _screenBounds.x = -1f;
     // do some setup after finishes all gameobject effects
     EffectPrioritizerHelper.registerAsEndEffect(this as IEffectListener);
     // setup the effects chain triggered before load next scene
     beforeNextScene = GetComponent <BeforeLoadNextScene>();
     if (beforeNextScene != null)
     {
         beforeNextScene.setScene(targetScene);
     }
 }
Example #4
0
    private void initialize()
    {
        // calculate scaling if current GUI texture dimension is diferent than 64x64 because
        // the array of arrows were defined in a 64x64 basis
        float scaleW = 1f;
        float scaleH = 1f;

        guiElem = GetComponent <GUICustomElement>();
        Vector2 guiElemSize = guiElem.getSizeInPixels();

        scaleW = guiElemSize.x / 64f;
        scaleH = guiElemSize.y / 64f;

        // apply the scale
        for (int i = 0; i < arrowRects.Length; ++i)
        {
            Rect r = arrowRects[i];
            arrowRects[i].Set(r.x * scaleW, r.y * scaleH, r.width * scaleW, r.height * scaleH);
        }

        _screenBounds.x = -1f;         // initialize the screen bounds cache

        EffectPrioritizerHelper.registerAsEndEffect(this as IEffectListener);
    }
 void Awake()
 {
     guiSelector = GetComponent <Effect>();
     // when the OptionText effect finishes then call this effect
     EffectPrioritizerHelper.registerAsEndEffect(this as IEffectListener);
 }
Example #6
0
 void Awake()
 {
     chain       = GetComponents <Effect>();
     startEffect = EffectPrioritizerHelper.sortAndChain(chain);
 }
Example #7
0
    private Rect _screenBounds;     // cache for the screen bounds the GUI element covers

    protected override void ownAwake()
    {
        _screenBounds.x = -1f;         // initialize the screen bounds cache
        guiElem         = GetComponent <GUICustomElement>();
        EffectPrioritizerHelper.registerAsEndEffect(this as IEffectListener);
    }