public override bool Update(ref MartianSky.Ufo ufo) { if (this._ticks < 10) { ufo.Opacity += 0.1f; } else if (this._ticks > this._maxTicks - 10) { ufo.Opacity -= 0.1f; } // ISSUE: explicit reference operation // ISSUE: variable of a reference type MartianSky.Ufo& local = @ufo; // ISSUE: explicit reference operation Vector2 vector2 = Vector2.op_Addition((^ local).Position, this._speed); // ISSUE: explicit reference operation (^ local).Position = vector2; if (this._ticks == this._maxTicks) { return(false); } ++this._ticks; return(true); }
public override void InitializeUfo(ref MartianSky.Ufo ufo) { ufo.Position.X = (float)MartianSky.Ufo.Random.NextDouble() * (float)(Main.maxTilesX << 4); ufo.Position.Y = (float)(MartianSky.Ufo.Random.NextDouble() * 5000.0); ufo.Opacity = 0.0f; ufo.Rotation = 0.0f; this._ticks = 0; this._maxTicks = MartianSky.Ufo.Random.Next(120, 240); }
public override bool Update(ref MartianSky.Ufo ufo) { if (this._ticks < 10) { ufo.Opacity += 0.1f; } else if (this._ticks > this._maxTicks - 10) { ufo.Opacity -= 0.1f; } // ISSUE: explicit reference operation // ISSUE: variable of a reference type Vector2& local = @ufo.Position; // ISSUE: explicit reference operation Vector2 vector2 = Vector2.op_Addition(^ local, this._speed);
public override bool Update(ref MartianSky.Ufo ufo) { if (this._ticks < 10) { ufo.Opacity += 0.1f; } else if (this._ticks > this._maxTicks - 10) { ufo.Opacity -= 0.1f; } if (this._ticks == this._maxTicks) { return(false); } ++this._ticks; return(true); }
public override void InitializeUfo(ref MartianSky.Ufo ufo) { ufo.Position.X = (float)MartianSky.Ufo.Random.NextDouble() * (float)(Main.maxTilesX << 4); ufo.Position.Y = (float)(MartianSky.Ufo.Random.NextDouble() * 5000.0); ufo.Opacity = 0.0f; float num1 = (float)(MartianSky.Ufo.Random.NextDouble() * 5.0 + 10.0); double num2 = MartianSky.Ufo.Random.NextDouble() * 0.600000023841858 - 0.300000011920929; ufo.Rotation = (float)num2; if (MartianSky.Ufo.Random.Next(2) == 0) { num2 += 3.14159274101257; } this._speed = new Vector2((float)Math.Cos(num2) * num1, (float)Math.Sin(num2) * num1); this._ticks = 0; this._maxTicks = MartianSky.Ufo.Random.Next(400, 500); }
public override void InitializeUfo(ref MartianSky.Ufo ufo) { ufo.Position.X = (float)(MartianSky.Ufo.Random.NextDouble() * (double)(Main.maxTilesX << 4)); ufo.Position.Y = (float)(MartianSky.Ufo.Random.NextDouble() * 5000); ufo.Opacity = 0f; float single = (float)MartianSky.Ufo.Random.NextDouble() * 5f + 10f; double num = MartianSky.Ufo.Random.NextDouble() * 0.600000023841858 - 0.300000011920929; ufo.Rotation = (float)num; if (MartianSky.Ufo.Random.Next(2) == 0) { num = num + 3.14159274101257; } this._speed = new Vector2((float)Math.Cos(num) * single, (float)Math.Sin(num) * single); this._ticks = 0; this._maxTicks = MartianSky.Ufo.Random.Next(400, 500); }
// Token: 0x06001788 RID: 6024 RVA: 0x0043A9D0 File Offset: 0x00438BD0 public override bool Update(ref MartianSky.Ufo ufo) { if (this._ticks < 10) { ufo.Opacity += 0.1f; } else if (this._ticks > this._maxTicks - 10) { ufo.Opacity -= 0.1f; } ufo.Position += this._speed; if (this._ticks == this._maxTicks) { return(false); } this._ticks++; return(true); }
public override bool Update(ref MartianSky.Ufo ufo) { if (this._ticks < 10) { ufo.Opacity = ufo.Opacity + 0.1f; } else if (this._ticks > this._maxTicks - 10) { ufo.Opacity = ufo.Opacity - 0.1f; } if (this._ticks == this._maxTicks) { return(false); } MartianSky.HoverBehavior hoverBehavior = this; hoverBehavior._ticks = hoverBehavior._ticks + 1; return(true); }
public override bool Update(ref MartianSky.Ufo ufo) { if (this._ticks < 10) { ufo.Opacity = ufo.Opacity + 0.1f; } else if (this._ticks > this._maxTicks - 10) { ufo.Opacity = ufo.Opacity - 0.1f; } ufo.Position = ufo.Position + this._speed; if (this._ticks == this._maxTicks) { return(false); } MartianSky.ZipBehavior zipBehavior = this; zipBehavior._ticks = zipBehavior._ticks + 1; return(true); }
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; }
// 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; }
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; }
public abstract bool Update(ref MartianSky.Ufo ufo);
public abstract void InitializeUfo(ref MartianSky.Ufo ufo);