Пример #1
0
        private void PageMove(int move)
        {
            int    num1   = Math.Sign(move);
            int    index  = this.PageIndex + move;
            Sprite sprite = this.GetSprite(ref index);

            if (this.PageIndex == index)
            {
                return;
            }
            if (this._currentElement != null)
            {
                this._currentElement.Close(this._pageFadeTime, this._pageMoveX * (float)num1);
            }
            this._currentElement = this.GetElement();
            TutorialLoadingImageUIElement currentElement = this._currentElement;
            int num2 = index;

            this.PageIndex = num2;
            int num3 = num2;

            currentElement.Index             = num3;
            this._currentElement.ImageSprite = sprite;
            this._currentElement.Open(this._pageFadeTime, this._pageMoveX * (float)num1);
            this.PlaySE(SoundPack.SystemSE.Page);
        }
Пример #2
0
 private void ReturnElement(TutorialLoadingImageUIElement elm)
 {
     if (Object.op_Equality((Object)elm, (Object)null) || this._elementPool.Contains(elm))
     {
         return;
     }
     this.SetActive((Component)elm, false);
     this._elementPool.Add(elm);
 }
Пример #3
0
        private TutorialLoadingImageUIElement GetElement()
        {
            TutorialLoadingImageUIElement loadingImageUiElement = this._elementPool.PopFront <TutorialLoadingImageUIElement>();

            if (Object.op_Equality((Object)loadingImageUiElement, (Object)null))
            {
                loadingImageUiElement = (TutorialLoadingImageUIElement)((GameObject)Object.Instantiate <GameObject>((M0)this._elementPrefab, this._elementRoot, false)).GetComponent <TutorialLoadingImageUIElement>();
            }
            loadingImageUiElement.CanvasAlpha = 0.0f;
            ((Component)loadingImageUiElement).get_transform().SetAsLastSibling();
            this.SetActive((Component)loadingImageUiElement, true);
            loadingImageUiElement.OnCloseEvent = (Action <TutorialLoadingImageUIElement>)(x => this.ReturnElement(x));
            return(loadingImageUiElement);
        }
Пример #4
0
        private void SetupElement(int index)
        {
            if (Object.op_Inequality((Object)this._currentElement, (Object)null))
            {
                this.ReturnElement(this._currentElement);
                this._currentElement = (TutorialLoadingImageUIElement)null;
            }
            TutorialLoadingImageUIElement loadingImageUiElement = this._currentElement = this.GetElement();

            loadingImageUiElement.ImageSprite = this.GetSprite(ref index);
            loadingImageUiElement.Index       = index;
            loadingImageUiElement.CanvasAlpha = 1f;
            ((Component)loadingImageUiElement).get_transform().set_localPosition(Vector3.get_zero());
        }