forked from team-sg/hero-mark-2
give the pigs' guns a little more BANG for their buck HAHAHAHAHAHAHAHAHAHA
This commit is contained in:
parent
64ff2d38df
commit
659e812189
4 changed files with 67 additions and 1 deletions
BIN
graphics/particles/muzzle_flash.png
Normal file
BIN
graphics/particles/muzzle_flash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 596 B |
35
graphics/particles/muzzle_flash.png.import
Normal file
35
graphics/particles/muzzle_flash.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/muzzle_flash.png-b54cbcced1f0d7a86670b4da7d4f76be.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/particles/muzzle_flash.png"
|
||||||
|
dest_files=[ "res://.import/muzzle_flash.png-b54cbcced1f0d7a86670b4da7d4f76be.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=false
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
|
@ -15,6 +15,7 @@ onready var shoot_cast = $"%ShootCast"
|
||||||
onready var graphics_cast = $"%GraphicsCast"
|
onready var graphics_cast = $"%GraphicsCast"
|
||||||
onready var shoot_line = $"%ShootLine"
|
onready var shoot_line = $"%ShootLine"
|
||||||
onready var sparks = $SparkParticles
|
onready var sparks = $SparkParticles
|
||||||
|
onready var muzzle_flash = $"%MuzzleFlashParticles"
|
||||||
|
|
||||||
var shooting = false
|
var shooting = false
|
||||||
var turns = 0
|
var turns = 0
|
||||||
|
@ -40,6 +41,10 @@ func _physics_process(delta):
|
||||||
if collider != null && collider.is_in_group("player"):
|
if collider != null && collider.is_in_group("player"):
|
||||||
# kill player and enter shooting state temporarily
|
# kill player and enter shooting state temporarily
|
||||||
collider.get_parent().die()
|
collider.get_parent().die()
|
||||||
|
# play sound
|
||||||
|
Audio.play_sound(Audio.a_die_robot, Audio.ac_boss)
|
||||||
|
# muzzle flash
|
||||||
|
muzzle_flash.emitting = true
|
||||||
shooting = true
|
shooting = true
|
||||||
get_tree().create_timer(0.05, false).connect("timeout", self, "_stop_shoot")
|
get_tree().create_timer(0.05, false).connect("timeout", self, "_stop_shoot")
|
||||||
sprite.play("shoot")
|
sprite.play("shoot")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=17 format=2]
|
[gd_scene load_steps=20 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://objects/enemy/cop.gd" type="Script" id=1]
|
[ext_resource path="res://objects/enemy/cop.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://graphics/enemy/cop/cop_idle.png" type="Texture" id=2]
|
[ext_resource path="res://graphics/enemy/cop/cop_idle.png" type="Texture" id=2]
|
||||||
|
@ -6,6 +6,7 @@
|
||||||
[ext_resource path="res://graphics/enemy/cop/cop_shoot.png" type="Texture" id=4]
|
[ext_resource path="res://graphics/enemy/cop/cop_shoot.png" type="Texture" id=4]
|
||||||
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=5]
|
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=5]
|
||||||
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=6]
|
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=6]
|
||||||
|
[ext_resource path="res://graphics/particles/muzzle_flash.png" type="Texture" id=7]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=7]
|
[sub_resource type="ShaderMaterial" id=7]
|
||||||
shader = ExtResource( 5 )
|
shader = ExtResource( 5 )
|
||||||
|
@ -50,6 +51,14 @@ animations = [ {
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
} ]
|
} ]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id=11]
|
||||||
|
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.5, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id=12]
|
||||||
|
interpolation_mode = 2
|
||||||
|
offsets = PoolRealArray( 0.20339, 0.432203 )
|
||||||
|
colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 0.290196, 1 )
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=8]
|
[sub_resource type="RectangleShape2D" id=8]
|
||||||
extents = Vector2( 3, 8 )
|
extents = Vector2( 3, 8 )
|
||||||
|
|
||||||
|
@ -98,6 +107,23 @@ points = PoolVector2Array( 0, 0, 8, 0 )
|
||||||
width = 1.0
|
width = 1.0
|
||||||
default_color = Color( 1, 1, 0.290196, 1 )
|
default_color = Color( 1, 1, 0.290196, 1 )
|
||||||
|
|
||||||
|
[node name="MuzzleFlashParticles" type="CPUParticles2D" parent="AnimatedSprite/ShootPosition"]
|
||||||
|
pause_mode = 2
|
||||||
|
unique_name_in_owner = true
|
||||||
|
rotation = 1.0472
|
||||||
|
emitting = false
|
||||||
|
amount = 6
|
||||||
|
lifetime = 0.2
|
||||||
|
one_shot = true
|
||||||
|
explosiveness = 0.75
|
||||||
|
draw_order = 1
|
||||||
|
texture = ExtResource( 7 )
|
||||||
|
gravity = Vector2( 0, 0 )
|
||||||
|
angle = 120.0
|
||||||
|
angle_random = 1.0
|
||||||
|
scale_amount_curve = SubResource( 11 )
|
||||||
|
color_ramp = SubResource( 12 )
|
||||||
|
|
||||||
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue