Exemple #1
0
 public MimaShock(
     IAudioEngine so,
     SceneBattle p,
     int pX,
     int pY,
     Panel.COLOR u,
     int po,
     MimaShock.MOTION m)
     : base(so, p, pX, pY, u, po, ChipBase.ELEMENT.normal)
 {
     if (this.InArea)
     {
         if (this.parent.panel[this.position.X, this.position.Y].state == Panel.PANEL._break)
         {
             return;
         }
         this.canCounter       = false;
         this.time             = 1;
         this.speed            = 3;
         this.invincibility    = false;
         this.animationpoint.X = 0;
         this.hitrange         = new Point(0, 0);
         this.hitting          = false;
         this.rebirth          = this.union == Panel.COLOR.red;
         this.positionre       = this.position;
         this.positionDirect   = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 82);
         this.sound.PlaySE(SoundEffect.waveshort);
         this.motion = m;
         this.frame  = 0;
     }
     else
     {
         this.flag = false;
     }
 }
Exemple #2
0
        public override void Updata()
        {
            if (this.hitting)
            {
                this.PanelBright();
            }
            if (this.over)
            {
                return;
            }
            if (this.moveflame)
            {
                if (this.motion == MimaShock.MOTION.init)
                {
                    if (this.frame == 4)
                    {
                        this.frame  = 0;
                        this.motion = MimaShock.MOTION.set;
                    }
                }
                else
                {
                    this.animationpoint.X = this.frame;
                    switch (this.frame)
                    {
                    case 2:
                        this.hitting = true;
                        break;

                    case 4:
                        this.sound.PlaySE(SoundEffect.waveshort);
                        this.hitting = false;
                        break;

                    case 6:
                        this.flag = false;
                        break;
                    }
                }
            }
            this.FlameControl();
        }