public void LostFlag(bool lost) { this.motion = !lost ? HalfSoul.MOTION.unlost : HalfSoul.MOTION.lost; this.waittime = 0; this.frame = 0; this.roopneutral = 0; }
protected override void Moving() { switch (this.motion) { case HalfSoul.MOTION.neutral: if (this.moveflame) { ++this.waittime; } if (this.moveflame || this.attack) { this.animationpoint = this.AnimeNeutral(this.waittime); if (this.waittime >= 4 || this.attack) { this.waittime = 0; ++this.roopneutral; if (this.roopneutral >= 8 && this.parent.nowscene != SceneBattle.BATTLESCENE.end || this.attack) { this.roopneutral = 0; this.waittime = 0; this.motion = HalfSoul.MOTION.move; } } break; } break; case HalfSoul.MOTION.move: this.animationpoint = this.AnimeMove(this.waittime); if (this.moveflame) { switch (this.waittime) { case 0: if (this.attack) { this.MoveRandom(true, true); } else { this.MoveRandom(false, false); } if (this.position == this.positionre) { this.motion = !this.attack ? HalfSoul.MOTION.neutral : HalfSoul.MOTION.attack; this.waittime = 0; this.frame = 0; this.roopneutral = 0; ++this.roopmove; break; } break; case 3: this.position = this.positionre; this.PositionDirectSet(); break; case 5: this.motion = !this.attack ? HalfSoul.MOTION.neutral : HalfSoul.MOTION.attack; this.waittime = 0; this.frame = 0; this.roopneutral = 0; ++this.roopmove; break; } ++this.waittime; break; } break; case HalfSoul.MOTION.attack: this.animationpoint = this.AnimeAttack(this.waittime); if (this.moveflame) { switch (this.waittime) { case 5: this.sound.PlaySE(SoundEffect.sword); AttackBase attackBase1 = new SwordAttack(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, 100, 2, this.element, false, false); attackBase1.invincibility = false; this.parent.attacks.Add(attackBase1); break; case 9: this.sound.PlaySE(SoundEffect.sword); AttackBase attackBase2 = new LanceAttack(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, 100, 2, this.element, true); attackBase2.invincibility = false; this.parent.attacks.Add(attackBase2); break; case 20: this.motion = HalfSoul.MOTION.move; this.waittime = 0; this.attack = false; break; } ++this.waittime; break; } break; case HalfSoul.MOTION.lost: if (this.waittime < 4) { this.animationpoint = this.AnimeLost(this.waittime); if (this.waittime == 2) { this.nohit = true; } ++this.waittime; break; } break; case HalfSoul.MOTION.unlost: this.animationpoint = this.AnimeUnLost(this.waittime); if (this.waittime == 3) { this.nohit = false; this.waittime = 0; this.motion = HalfSoul.MOTION.neutral; } ++this.waittime; break; } this.FlameControl(4); }