Skip to content

Commit

Permalink
Merge pull request #12 from jasonrobwebster/dev
Browse files Browse the repository at this point in the history
Version v0.1 updated
  • Loading branch information
jasonrobwebster authored Feb 27, 2021
2 parents 06b4c8a + 19836cb commit 000f957
Show file tree
Hide file tree
Showing 76 changed files with 819 additions and 1,595 deletions.
15 changes: 15 additions & 0 deletions default_bus_layout.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[gd_resource type="AudioBusLayout" format=2]

[resource]
bus/1/name = "Sfx"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = "Master"
bus/2/name = "Music"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = "Master"
2 changes: 1 addition & 1 deletion enemies/snake/Idle.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends "res://enemies/snake/SnakeState.gd"

const WANDER_CHANCE := 0.9
const INIT_TIME := 2
const INIT_TIME := 1
const EXTEND_TIME := 0.25

onready var timer: Timer = $Timer
Expand Down
60 changes: 48 additions & 12 deletions enemies/snake/Snake.tscn
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=11 format=2]

[ext_resource path="res://enemies/debug.png" type="Texture" id=1]
[ext_resource path="res://enemies/snake/snake.png" type="Texture" id=1]
[ext_resource path="res://enemies/Enemy.tscn" type="PackedScene" id=2]
[ext_resource path="res://enemies/snake/Idle.gd" type="Script" id=3]
[ext_resource path="res://enemies/snake/Wander.gd" type="Script" id=4]
[ext_resource path="res://enemies/snake/Attack.gd" type="Script" id=5]

[sub_resource type="CircleShape2D" id=1]
radius = 4.0

[sub_resource type="CircleShape2D" id=2]
radius = 4.0
[ext_resource path="res://boxes/Hitbox.tscn" type="PackedScene" id=6]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7, 3 )

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 5, 2 )

[sub_resource type="CircleShape2D" id=3]
radius = 6.0

[sub_resource type="Animation" id=4]
length = 0.6
loop = true
step = 0.15
tracks/0/type = "value"
tracks/0/path = NodePath("Pivot/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.3, 0.45 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2 ]
}

[node name="Snake" instance=ExtResource( 2 )]
spawn_chance = 0.1
Expand All @@ -31,8 +52,9 @@ one_shot = true
script = ExtResource( 5 )

[node name="Sprite" parent="Pivot" index="0"]
position = Vector2( 0, -4 )
position = Vector2( 6, -7 )
texture = ExtResource( 1 )
hframes = 3

[node name="FloorRay" type="RayCast2D" parent="Pivot" index="1"]
position = Vector2( 4, 0 )
Expand All @@ -48,18 +70,32 @@ cast_to = Vector2( 2, 0 )
position = Vector2( 0, -4 )

[node name="HitboxCollision" parent="Hitbox" index="0"]
position = Vector2( 0, 1 )
shape = SubResource( 1 )

[node name="Hurtbox" parent="." index="4"]
[node name="Hitbox2" parent="." index="4" instance=ExtResource( 6 )]
collision_layer = 0
collision_mask = 8

[node name="HitboxCollision" parent="Hitbox2" index="0"]
position = Vector2( 3, -8 )
shape = SubResource( 2 )

[node name="Hurtbox" parent="." index="5"]
visible = false
position = Vector2( 0, -4 )

[node name="HurtboxCollision" parent="Hurtbox" index="0"]
shape = SubResource( 2 )
position = Vector2( 0, -1 )
shape = SubResource( 3 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="5"]
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="6"]
anims/Slither = SubResource( 4 )
[connection signal="timeout" from="StateMachine/Idle/Timer" to="StateMachine/Idle" method="_on_Timer_timeout"]
[connection signal="timeout" from="StateMachine/Wander/Timer" to="StateMachine/Wander" method="_on_Timer_timeout"]

[editable path="Hitbox"]

[editable path="Hitbox2"]

[editable path="Hurtbox"]
1 change: 1 addition & 0 deletions enemies/snake/Wander.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func enter(_previous_state: String = '', _args = null):
# handle entering state
_direction = sign(pivot.scale.x)
timer.start(INIT_TIME)
anim_player.play("Slither")


func exit():
Expand Down
Binary file added enemies/snake/snake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

importer="texture"
type="StreamTexture"
path="res://.import/pot_pieces.png-3ece8331db24f12d8bdf5403d79f21eb.stex"
path="res://.import/snake.png-1942e1fcdb1934b762c9718c7c91b325.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://environment/pots/pot_pieces.png"
dest_files=[ "res://.import/pot_pieces.png-3ece8331db24f12d8bdf5403d79f21eb.stex" ]
source_file="res://enemies/snake/snake.png"
dest_files=[ "res://.import/snake.png-1942e1fcdb1934b762c9718c7c91b325.stex" ]

[params]

Expand Down
12 changes: 0 additions & 12 deletions environment/CarryItem.gd

This file was deleted.

19 changes: 0 additions & 19 deletions environment/CarryItem.tscn

This file was deleted.

73 changes: 0 additions & 73 deletions environment/pots/Pot.gd

This file was deleted.

86 changes: 0 additions & 86 deletions environment/pots/Pot.tscn

This file was deleted.

50 changes: 0 additions & 50 deletions environment/pots/PotBreak.gd

This file was deleted.

Loading

0 comments on commit 000f957

Please sign in to comment.