コード例 #1
0
ファイル: Drawable.cs プロジェクト: 207h2Flogintvg/LGame
		public void Update(GameTime gameTime, bool otherScreenHasFocus,
				bool coveredByOtherScreen) {
			this.otherScreenHasFocus = otherScreenHasFocus;
			if (this._isExiting) {
				this._drawableState = Painting.DrawableState.TransitionOff;
				if (!this.UpdateTransition(gameTime, this.transitionOffTime, 1)) {
					this.drawableScreen.RemoveDrawable(this);
				}
			} else if (coveredByOtherScreen) {
				if (this.UpdateTransition(gameTime, this.transitionOffTime, 1)) {
					this._drawableState = Painting.DrawableState.TransitionOff;
				} else {
					this._drawableState = Painting.DrawableState.Hidden;
				}
			} else if (this.UpdateTransition(gameTime, this.transitionOnTime, -1)) {
				this._drawableState = Painting.DrawableState.TransitionOn;
			} else {
				this._drawableState = Painting.DrawableState.Active;
			}
	
			Update(gameTime);
		}
コード例 #2
0
		public void Draw(SpriteBatch batch, GameTime gameTime) {
		}
コード例 #3
0
ファイル: Drawable.cs プロジェクト: 207h2Flogintvg/LGame
		public abstract void Update(GameTime elapsedTime);
コード例 #4
0
ファイル: Drawable.cs プロジェクト: 207h2Flogintvg/LGame
		public abstract void Draw(SpriteBatch batch, GameTime elapsedTime);
コード例 #5
0
ファイル: Drawable.cs プロジェクト: 207h2Flogintvg/LGame
		private bool UpdateTransition(GameTime gameTime, float time,
				int direction) {
			float num;
			if (time == 0f) {
				num = 1f;
			} else {
				num = (gameTime.GetElapsedGameTime() / time);
			}
	
			this._transitionPosition += num * direction;
			if (((direction < 0) && (this._transitionPosition <= 0f))
					|| ((direction > 0) && (this._transitionPosition >= 1f))) {
				this._transitionPosition = MathUtils.Clamp(
						this._transitionPosition, 0f, 1f);
				return false;
			}
			return true;
		}
コード例 #6
0
 public abstract void Update(GameTime gameTime);