Пример #1
0
 public void shake(int extraInfo)
 {
     this.maxShake = 0.07363108f;
     if (extraInfo == 1)
     {
         Game1.playSound("leafrustle");
         JunimoNoteMenu.tempSprites.Add(new TemporaryAnimatedSprite(50, this.sprite.position, Bundle.getColorFromColorIndex(this.bundleColor), 8, false, 100f, 0, -1, -1f, -1, 0)
         {
             motion       = new Vector2(-1f, 0.5f),
             acceleration = new Vector2(0f, 0.02f)
         });
         JunimoNoteMenu.tempSprites.Add(new TemporaryAnimatedSprite(50, this.sprite.position, Bundle.getColorFromColorIndex(this.bundleColor), 8, false, 100f, 0, -1, -1f, -1, 0)
         {
             motion       = new Vector2(1f, 0.5f),
             acceleration = new Vector2(0f, 0.02f),
             flipped      = true,
             delayBeforeAnimationStart = 50
         });
     }
 }
Пример #2
0
        private void completionAnimation(bool playSound = true)
        {
            if (Game1.activeClickableMenu != null && Game1.activeClickableMenu is JunimoNoteMenu)
            {
                (Game1.activeClickableMenu as JunimoNoteMenu).takeDownBundleSpecificPage(null);
            }
            this.sprite.pingPong     = false;
            this.sprite.paused       = false;
            this.sprite.sourceRect.X = (int)this.sprite.sourceRectStartingPos.X;
            TemporaryAnimatedSprite expr_6C_cp_0_cp_0 = this.sprite;

            expr_6C_cp_0_cp_0.sourceRect.X      = expr_6C_cp_0_cp_0.sourceRect.X + this.sprite.sourceRect.Width;
            this.sprite.animationLength         = 15;
            this.sprite.interval                = 50f;
            this.sprite.totalNumberOfLoops      = 0;
            this.sprite.holdLastFrame           = true;
            this.sprite.endFunction             = new TemporaryAnimatedSprite.endBehavior(this.shake);
            this.sprite.extraInfoForEndBehavior = 1;
            if (this.complete)
            {
                TemporaryAnimatedSprite expr_F3_cp_0_cp_0 = this.sprite;
                expr_F3_cp_0_cp_0.sourceRect.X     = expr_F3_cp_0_cp_0.sourceRect.X + this.sprite.sourceRect.Width * 14;
                this.sprite.sourceRectStartingPos  = new Vector2((float)this.sprite.sourceRect.X, (float)this.sprite.sourceRect.Y);
                this.sprite.currentParentTileIndex = 14;
                this.sprite.interval                = 0f;
                this.sprite.animationLength         = 1;
                this.sprite.extraInfoForEndBehavior = 0;
            }
            else
            {
                if (playSound)
                {
                    Game1.playSound("dwop");
                }
                this.bounds.Inflate(Game1.tileSize, Game1.tileSize);
                JunimoNoteMenu.tempSprites.AddRange(Utility.sparkleWithinArea(this.bounds, 8, Bundle.getColorFromColorIndex(this.bundleColor) * 0.5f, 100, 0, ""));
                this.bounds.Inflate(-Game1.tileSize, -Game1.tileSize);
            }
            this.complete = true;
        }
Пример #3
0
        public void shake(int extraInfo)
        {
            this.maxShake = 3f * (float)Math.PI / 128f;
            if (extraInfo != 1)
            {
                return;
            }
            Game1.playSound("leafrustle");
            JunimoNoteMenu.tempSprites.Add(new TemporaryAnimatedSprite(50, this.sprite.position, Bundle.getColorFromColorIndex(this.bundleColor), 8, false, 100f, 0, -1, -1f, -1, 0)
            {
                motion       = new Vector2(-1f, 0.5f),
                acceleration = new Vector2(0.0f, 0.02f)
            });
            List <TemporaryAnimatedSprite> tempSprites             = JunimoNoteMenu.tempSprites;
            TemporaryAnimatedSprite        temporaryAnimatedSprite = new TemporaryAnimatedSprite(50, this.sprite.position, Bundle.getColorFromColorIndex(this.bundleColor), 8, false, 100f, 0, -1, -1f, -1, 0);

            temporaryAnimatedSprite.motion       = new Vector2(1f, 0.5f);
            temporaryAnimatedSprite.acceleration = new Vector2(0.0f, 0.02f);
            int num1 = 1;

            temporaryAnimatedSprite.flipped = num1 != 0;
            int num2 = 50;

            temporaryAnimatedSprite.delayBeforeAnimationStart = num2;
            tempSprites.Add(temporaryAnimatedSprite);
        }