forked from team-sg/hero-mark-2
first half of the squig
This commit is contained in:
parent
afa641901c
commit
b4b7577479
5 changed files with 169 additions and 2 deletions
BIN
graphics/enemy/squig.png
Normal file
BIN
graphics/enemy/squig.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 816 B |
35
graphics/enemy/squig.png.import
Normal file
35
graphics/enemy/squig.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/squig.png-17d636ce34898af05744f4145669e9ed.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/enemy/squig.png"
|
||||
dest_files=[ "res://.import/squig.png-17d636ce34898af05744f4145669e9ed.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
|
|
@ -1,5 +1,6 @@
|
|||
[gd_scene load_steps=28 format=2]
|
||||
[gd_scene load_steps=29 format=2]
|
||||
|
||||
[ext_resource path="res://objects/enemy/squig.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2]
|
||||
[ext_resource path="res://tilesets/t_mountain.tres" type="TileSet" id=3]
|
||||
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=4]
|
||||
|
@ -131,13 +132,13 @@ position = Vector2( 48, 120 )
|
|||
|
||||
[node name="AnimatedSprite" parent="RollingFiend" index="0"]
|
||||
visible = false
|
||||
frame = 0
|
||||
|
||||
[node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"]
|
||||
material = SubResource( 4 )
|
||||
position = Vector2( 4, 4 )
|
||||
z_index = -3
|
||||
frames = SubResource( 5 )
|
||||
frame = 1
|
||||
playing = true
|
||||
|
||||
[node name="Steam" parent="." instance=ExtResource( 23 )]
|
||||
|
@ -166,4 +167,7 @@ position = Vector2( 152, 72 )
|
|||
[node name="Player2" parent="." instance=ExtResource( 27 )]
|
||||
position = Vector2( 112, 176 )
|
||||
|
||||
[node name="Squig" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 128, 160 )
|
||||
|
||||
[editable path="RollingFiend"]
|
||||
|
|
13
objects/enemy/squig.gd
Normal file
13
objects/enemy/squig.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends "res://objects/enemy/enemy.gd"
|
||||
|
||||
export var speed: float = 50.0
|
||||
export var damping: float = 0.9
|
||||
|
||||
var velocity: Vector2 = Vector2.ZERO
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
velocity.y *= pow(damping, delta)
|
||||
global_position += velocity * delta
|
||||
|
||||
func _propel() -> void:
|
||||
velocity.y = -speed
|
115
objects/enemy/squig.tscn
Normal file
115
objects/enemy/squig.tscn
Normal file
|
@ -0,0 +1,115 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://objects/enemy/squig.gd" type="Script" id=1]
|
||||
[ext_resource path="res://graphics/enemy/squig.png" type="Texture" id=2]
|
||||
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 3.5, 3.5 )
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ 0 ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("InkParticles:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ false ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "swimming"
|
||||
length = 1.5
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.5 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 0, 1 ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("InkParticles:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0, 0.5 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true ]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/path = NodePath(".")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0.5 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "_propel"
|
||||
} ]
|
||||
}
|
||||
|
||||
[node name="Squig" type="Node2D" groups=["enemy"]]
|
||||
script = ExtResource( 1 )
|
||||
damping = 0.5
|
||||
|
||||
[node name="InkParticles" type="CPUParticles2D" parent="."]
|
||||
position = Vector2( 3.5, 7 )
|
||||
emitting = false
|
||||
amount = 32
|
||||
lifetime = 2.0
|
||||
local_coords = false
|
||||
texture = ExtResource( 3 )
|
||||
spread = 180.0
|
||||
gravity = Vector2( 0, 0 )
|
||||
initial_velocity = 8.0
|
||||
initial_velocity_random = 0.5
|
||||
damping = 4.0
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 4, 4 )
|
||||
texture = ExtResource( 2 )
|
||||
hframes = 2
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
||||
position = Vector2( 4, 4 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( -0.5, -0.5 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
autoplay = "swimming"
|
||||
anims/RESET = SubResource( 2 )
|
||||
anims/swimming = SubResource( 4 )
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
Loading…
Add table
Add a link
Reference in a new issue