piggy gore UwU
This commit is contained in:
parent
e1b5c498f3
commit
e6ed63dd60
2 changed files with 27 additions and 2 deletions
|
@ -9,7 +9,7 @@ export var idle_turns = 0
|
|||
export var turn_time = 0.5
|
||||
export var shoot_time = 1.0
|
||||
|
||||
export var bones_amount = 5
|
||||
export var bones_amount = 8
|
||||
export var bones_speed = 50.0
|
||||
|
||||
onready var sprite = $AnimatedSprite
|
||||
|
@ -24,6 +24,7 @@ var shooting = false
|
|||
var turns = 0
|
||||
|
||||
const BoneParticle = preload("res://objects/enemy/bone_particle.tscn")
|
||||
const GoreParticle = preload("res://objects/enemy/gore_particle.tscn")
|
||||
const EasyBullet = preload("res://objects/enemy/roboturret_proj.tscn")
|
||||
const BulletCasing = preload("res://objects/enemy/bullet_casing.tscn")
|
||||
|
||||
|
@ -169,7 +170,11 @@ func _set_right_boundary(value):
|
|||
|
||||
func die():
|
||||
for n in bones_amount:
|
||||
var bone = BoneParticle.instance()
|
||||
var bone
|
||||
if randi() % 3 == 0:
|
||||
bone = BoneParticle.instance()
|
||||
else:
|
||||
bone = GoreParticle.instance()
|
||||
bone.rotation = rand_range(0.0, 2.0*PI) # random rotation
|
||||
bone.global_position = global_position
|
||||
bone.linear_velocity = Vector2(bones_speed * rand_range(0.5, 1.5), 0.0).rotated(rand_range(-PI, 0.0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue