コード例 #1
0
ファイル: AUI_LineWithRecs.cs プロジェクト: wisniewski94/AUI
 public override void Open()
 {
     if (displayState == DisplayState.Closed)
     {
         displayState = DisplayState.Opening;
         line.Open(); recA.Open();
         recA.alpha = 1.0f; recB.alpha = 0.0f;
     }
 }
コード例 #2
0
ファイル: AUI_Window.cs プロジェクト: wisniewski94/AUI
 public override void Open()
 {
     if (displayState != DisplayState.Closed)
     {
         return;
     }
     displayState = DisplayState.Opening;
     rec_bkg.Open(); openCounter = 0; //bkg, then fore
 }
コード例 #3
0
ファイル: AUI_LineWithRecs.cs プロジェクト: wisniewski94/AUI
        public override void Update()
        {
            line.Update(); recA.Update(); recB.Update();

            if (displayState == DisplayState.Opening)
            {
                if (line.displayState == DisplayState.Opened)
                {
                    displayState            = DisplayState.Opened;
                    recB.Open(); recB.alpha = 1.0f;
                }
            }
            else if (displayState == DisplayState.Opened)
            {
            }
            else if (displayState == DisplayState.Closing)
            {
                if (recA.alpha > 0.0f)
                {
                    recA.alpha -= 0.05f;
                }
                else
                {
                    recA.alpha = 0.0f;
                }
                if (recB.alpha > 0.0f)
                {
                    recB.alpha -= 0.05f;
                }
                else
                {
                    recB.alpha = 0.0f;
                }

                if (line.displayState == DisplayState.Closed
                    & recA.alpha == 0.0f & recB.alpha == 0.0f)
                {
                    displayState = DisplayState.Closed;
                }
            }
            else if (displayState == DisplayState.Closed)
            {
            }

            //Debug.WriteLine("linewDots ds: " + displayState);
            //Debug.WriteLine("line ds: " + line.displayState);
            //Debug.WriteLine("recA ds: " + recA.displayState);
            //Debug.WriteLine("recB ds: " + recB.displayState);
        }
コード例 #4
0
ファイル: AUI_Window.cs プロジェクト: wisniewski94/AUI
        public override void Update()
        {
            rec_bkg.Update(); rec_fore.Update();

            if (displayState == DisplayState.Opening)
            {
                openCounter++;
                if (openCounter >= openWait)
                {
                    rec_fore.Open();
                }

                if (rec_bkg.displayState == DisplayState.Opened &
                    rec_fore.displayState == DisplayState.Opened)
                {
                    displayState = DisplayState.Opened;
                }
            }
            else if (displayState == DisplayState.Opened)
            {
            }
            else if (displayState == DisplayState.Closing)
            {
                closeCounter++;
                if (closeCounter >= closeWait)
                {
                    rec_bkg.Close();
                }

                if (rec_fore.displayState == DisplayState.Closed &
                    rec_bkg.displayState == DisplayState.Closed)
                {
                    displayState = DisplayState.Closed;
                }
            }
            else if (displayState == DisplayState.Closed)
            {
            }
        }