Esempio n. 1
0
 public CrackThunder(
     IAudioEngine so,
     SceneBattle p,
     int pX,
     int pY,
     Panel.COLOR u,
     int po,
     bool crack)
     : base(so, p, pX, pY, u, po, ChipBase.ELEMENT.eleki)
 {
     this.canCounter       = false;
     this.element          = ChipBase.ELEMENT.eleki;
     this.speed            = 3;
     this.knock            = true;
     this.invincibility    = true;
     this.animationpoint.X = 0;
     this.hitrange         = new Point(0, 0);
     this.hitting          = false;
     this.rebirth          = this.union == Panel.COLOR.blue;
     this.positionre       = this.position;
     this.positionDirect   = new Vector2(this.position.X * 40 + 20, this.position.Y * 24 + 82);
     this.sound.PlaySE(SoundEffect.thunder);
     this.motion = CrackThunder.MOTION.init;
     this.frame  = 0;
     this.crack  = crack;
 }
Esempio n. 2
0
        public override void Updata()
        {
            this.PanelBright();
            if (this.over)
            {
                return;
            }
            if (this.moveflame)
            {
                switch (this.motion)
                {
                case CrackThunder.MOTION.init:
                    this.animationpoint.X = this.frame;
                    if (this.frame >= 3)
                    {
                        this.hitting = true;
                        this.motion  = CrackThunder.MOTION.set;
                        if (this.crack)
                        {
                            this.ShakeStart(4, 3);
                            this.sound.PlaySE(SoundEffect.canon);
                            this.StandPanel.Crack();
                        }
                        break;
                    }
                    break;

                case CrackThunder.MOTION.set:
                    this.animationpoint.X = this.frame;
                    if (this.frame >= 3)
                    {
                        this.hitting = false;
                        this.frame   = 0;
                        this.motion  = CrackThunder.MOTION.end;
                        break;
                    }
                    break;

                case CrackThunder.MOTION.end:
                    this.flag = false;
                    break;
                }
            }
            this.FlameControl();
        }