Mercurial > touhou
comparison src/th06/ecl_vm.rs @ 688:1adecaddf442
ecl_vm: implement SetBulletInterval and SetBulletIntervalEx.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 17 Aug 2019 13:50:54 +0200 |
parents | aefe5b5f481e |
children | eecb8626f472 |
comparison
equal
deleted
inserted
replaced
687:ac092b70c39a | 688:1adecaddf442 |
---|---|
605 gen_SetBulletAttributes!(self, 75, anim, sprite_index_offset, bullets_per_shot, | 605 gen_SetBulletAttributes!(self, 75, anim, sprite_index_offset, bullets_per_shot, |
606 number_of_shots, speed, speed2, launch_angle, angle, | 606 number_of_shots, speed, speed2, launch_angle, angle, |
607 flags); | 607 flags); |
608 } | 608 } |
609 | 609 |
610 | 610 // 76 |
611 SubInstruction::SetBulletInterval(interval) => { | |
612 let mut enemy = self.enemy.borrow_mut(); | |
613 enemy.set_bullet_launch_interval(0, interval); | |
614 } | |
615 | |
616 // 77 | |
617 SubInstruction::SetBulletIntervalEx(interval) => { | |
618 let rand_start = self.get_prng().borrow_mut().get_u32(); | |
619 | |
620 let mut enemy = self.enemy.borrow_mut(); | |
621 enemy.set_bullet_launch_interval(rand_start, interval); | |
622 } | |
611 | 623 |
612 // 78-79 are more interpolation flags | 624 // 78-79 are more interpolation flags |
613 // 78 | 625 // 78 |
614 SubInstruction::DelayAttack() => { | 626 SubInstruction::DelayAttack() => { |
615 let mut enemy = self.enemy.borrow_mut(); | 627 let mut enemy = self.enemy.borrow_mut(); |