public Confetti(float xpos, float ypos) : base(xpos, ypos) { int num = Rando.ChooseInt(0, 1, 2, 3); if (num == 0) { this._color = Color.Violet; } if (num == 1) { this._color = Color.SkyBlue; } if (num == 2) { this._color = Color.Wheat; } if (num == 4) { this._color = Color.GreenYellow; } this._sin = new SinWave(0.01f + Rando.Float(0.03f), Rando.Float(7f)); this._size = 10f + Rando.Float(60f); this._speed = 0.8f + Rando.Float(1.4f); this.depth = new Depth(0.95f); }
public ChallengeConfetti(float xpos, float ypos) : base(xpos, ypos) { SpriteMap spriteMap = new SpriteMap("arcade/confetti", 8, 8); spriteMap.AddAnimation("idle", 0.1f, true, 0, 1); spriteMap.SetAnimation("idle"); this.graphic = (Sprite)spriteMap; this._fallSpeed = Rando.Float(0.5f, 1.2f); this.layer = Layer.HUD; int num = Rando.ChooseInt(0, 1, 2, 3); if (num == 0) { spriteMap.color = Color.Violet; } if (num == 1) { spriteMap.color = Color.SkyBlue; } if (num == 2) { spriteMap.color = Color.Wheat; } if (num == 4) { spriteMap.color = Color.GreenYellow; } this.depth = new Depth(1f); }
public MusicNote(float xpos, float ypos, Vec2 dir) : base(xpos, ypos) { this._sprite = new SpriteMap("notes", 8, 8); this._sprite.frame = Rando.Int(1); this._sprite.CenterOrigin(); int num1 = Rando.ChooseInt(0, 1, 2, 3); if (num1 == 0) { this._color = Color.Violet; } if (num1 == 1) { this._color = Color.SkyBlue; } if (num1 == 2) { this._color = Color.Wheat; } if (num1 == 4) { this._color = Color.GreenYellow; } this._dir = dir; float num2 = 1f; if ((double)Rando.Float(1f) <= 0.5) { num2 = -1f; } this._sin = new SinWave(0.03f + Rando.Float(0.1f), num2 * 6.283185f); this._size = 3f + Rando.Float(6f); this._speed = 0.8f + Rando.Float(1.4f); this.depth = new Depth(0.95f); this.scale = new Vec2(0.1f, 0.1f); }