Update() 공개 메소드

public Update ( ) : bool
리턴 bool
예제 #1
0
        public override void Update()
        {
            if (Main.gamePaused || !Main.hasFocus)
            {
                return;
            }
            int num = this._activeUfos;

            for (int i = 0; i < (int)this._ufos.Length; i++)
            {
                MartianSky.Ufo frame = this._ufos[i];
                if (frame.IsActive)
                {
                    frame.Frame = frame.Frame + 1;
                    if (!frame.Update())
                    {
                        if (this._leaving)
                        {
                            frame.IsActive = false;
                            num--;
                        }
                        else
                        {
                            frame.AssignNewBehavior();
                        }
                    }
                }
                this._ufos[i] = frame;
            }
            if (!this._leaving && num != this._maxUfos)
            {
                this._ufos[num].IsActive = true;
                int num1 = num;
                num = num1 + 1;
                this._ufos[num1].AssignNewBehavior();
            }
            this._active     = (!this._leaving ? true : num != 0);
            this._activeUfos = num;
        }
예제 #2
0
        // Token: 0x060011E2 RID: 4578 RVA: 0x0040F8F8 File Offset: 0x0040DAF8
        public override void Update(GameTime gameTime)
        {
            if (Main.gamePaused || !Main.hasFocus)
            {
                return;
            }
            int num = this._activeUfos;

            for (int i = 0; i < this._ufos.Length; i++)
            {
                MartianSky.Ufo ufo = this._ufos[i];
                if (ufo.IsActive)
                {
                    int frame = ufo.Frame;
                    ufo.Frame = frame + 1;
                    if (!ufo.Update())
                    {
                        if (!this._leaving)
                        {
                            ufo.AssignNewBehavior();
                        }
                        else
                        {
                            ufo.IsActive = false;
                            num--;
                        }
                    }
                }
                this._ufos[i] = ufo;
            }
            if (!this._leaving && num != this._maxUfos)
            {
                this._ufos[num].IsActive = true;
                this._ufos[num++].AssignNewBehavior();
            }
            this._active     = (!this._leaving || num != 0);
            this._activeUfos = num;
        }
예제 #3
0
        public override void Update(GameTime gameTime)
        {
            if (Main.gamePaused || !Main.hasFocus)
            {
                return;
            }
            int activeUfos = this._activeUfos;

            for (int index = 0; index < this._ufos.Length; ++index)
            {
                MartianSky.Ufo ufo = this._ufos[index];
                if (ufo.IsActive)
                {
                    ++ufo.Frame;
                    if (!ufo.Update())
                    {
                        if (!this._leaving)
                        {
                            ufo.AssignNewBehavior();
                        }
                        else
                        {
                            ufo.IsActive = false;
                            --activeUfos;
                        }
                    }
                }
                this._ufos[index] = ufo;
            }
            if (!this._leaving && activeUfos != this._maxUfos)
            {
                this._ufos[activeUfos].IsActive = true;
                this._ufos[activeUfos++].AssignNewBehavior();
            }
            this._active     = !this._leaving || activeUfos != 0;
            this._activeUfos = activeUfos;
        }