-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for week 3. Added some additional room decoration, lev…
…el regen on level exit, mob generation, and initial mob behavior.
- Loading branch information
Showing
48 changed files
with
1,460 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends Node2D | ||
|
||
onready var animation = $AnimationPlayer | ||
|
||
func clear(): | ||
var current = animation.get_current_animation() | ||
|
||
match current: | ||
"Alert": | ||
$Alert.visible = false | ||
"Chase": | ||
$Chase.visible = false | ||
|
||
animation.stop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
[gd_scene load_steps=6 format=2] | ||
|
||
[ext_resource path="res://Fonts/ThaleahFat.ttf" type="DynamicFontData" id=1] | ||
[ext_resource path="res://Effects/Bubble.gd" type="Script" id=2] | ||
|
||
[sub_resource type="DynamicFont" id=1] | ||
outline_size = 1 | ||
outline_color = Color( 0, 0, 0, 1 ) | ||
font_data = ExtResource( 1 ) | ||
|
||
[sub_resource type="Animation" id=2] | ||
resource_name = "Alert" | ||
length = 3.0 | ||
tracks/0/type = "value" | ||
tracks/0/path = NodePath("Alert:visible") | ||
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, 1, 1.5, 2, 2.5, 3 ), | ||
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), | ||
"update": 1, | ||
"values": [ false, true, false, true, false, true, false ] | ||
} | ||
|
||
[sub_resource type="Animation" id=3] | ||
resource_name = "Chase" | ||
length = 1.5 | ||
tracks/0/type = "value" | ||
tracks/0/path = NodePath("Chase:visible") | ||
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, 1, 1.5 ), | ||
"transitions": PoolRealArray( 1, 1, 1, 1 ), | ||
"update": 1, | ||
"values": [ true, false, true, false ] | ||
} | ||
|
||
[node name="Bubble" type="Node2D"] | ||
z_index = 1 | ||
script = ExtResource( 2 ) | ||
|
||
[node name="Alert" type="Label" parent="."] | ||
visible = false | ||
margin_left = -6.82016 | ||
margin_top = -24.236 | ||
margin_right = 9.17984 | ||
margin_bottom = -9.23597 | ||
custom_fonts/font = SubResource( 1 ) | ||
custom_colors/font_color = Color( 0.956863, 0.776471, 0.231373, 1 ) | ||
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 ) | ||
text = "?" | ||
align = 1 | ||
valign = 1 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="Chase" type="Label" parent="."] | ||
visible = false | ||
margin_left = -6.82016 | ||
margin_top = -24.236 | ||
margin_right = 9.17984 | ||
margin_bottom = -9.23597 | ||
custom_fonts/font = SubResource( 1 ) | ||
custom_colors/font_color = Color( 0.956863, 0.776471, 0.231373, 1 ) | ||
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 ) | ||
text = "!" | ||
align = 1 | ||
valign = 1 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] | ||
anims/Alert = SubResource( 2 ) | ||
anims/Chase = SubResource( 3 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[gd_scene load_steps=5 format=2] | ||
|
||
[ext_resource path="res://Effects/Sprites/HitEffect.png" type="Texture" id=1] | ||
|
||
[sub_resource type="AtlasTexture" id=1] | ||
atlas = ExtResource( 1 ) | ||
region = Rect2( 0, 0, 24, 24 ) | ||
|
||
[sub_resource type="AtlasTexture" id=2] | ||
atlas = ExtResource( 1 ) | ||
region = Rect2( 24, 0, 24, 24 ) | ||
|
||
[sub_resource type="SpriteFrames" id=3] | ||
animations = [ { | ||
"frames": [ SubResource( 1 ), SubResource( 2 ) ], | ||
"loop": false, | ||
"name": "default", | ||
"speed": 10.0 | ||
} ] | ||
|
||
[node name="HitEffect" type="AnimatedSprite"] | ||
frames = SubResource( 3 ) | ||
frame = 1 | ||
playing = true | ||
[connection signal="animation_finished" from="." to="." method="queue_free"] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/HitEffect.png-f5a3d3a1f1d6df534ee51df09be98487.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Effects/Sprites/HitEffect.png" | ||
dest_files=[ "res://.import/HitEffect.png-f5a3d3a1f1d6df534ee51df09be98487.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 | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
shader_type canvas_item; | ||
|
||
uniform bool active = false; | ||
|
||
void fragment() { | ||
vec4 previous_color = texture(TEXTURE, UV); | ||
vec4 white_color = vec4(1.0, 1.0, 1.0, previous_color.a); | ||
vec4 new_color = previous_color; | ||
|
||
if (active == true) { | ||
new_color = white_color; | ||
} | ||
|
||
COLOR = new_color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[gd_scene load_steps=10 format=2] | ||
|
||
[ext_resource path="res://Lights/Light.tscn" type="PackedScene" id=2] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Cauldron/cauldron_blue_3.png" type="Texture" id=4] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Cauldron/cauldron_blue_4.png" type="Texture" id=5] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Cauldron/cauldron_blue_1.png" type="Texture" id=6] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Cauldron/cauldron_blue_2.png" type="Texture" id=7] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Cauldron/cauldron_blue_5.png" type="Texture" id=8] | ||
|
||
[sub_resource type="SpriteFrames" id=1] | ||
animations = [ { | ||
"frames": [ ExtResource( 6 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 8 ) ], | ||
"loop": true, | ||
"name": "default", | ||
"speed": 2.0 | ||
} ] | ||
|
||
[sub_resource type="CapsuleShape2D" id=2] | ||
radius = 4.58025 | ||
height = 6.3634 | ||
|
||
[sub_resource type="OccluderPolygon2D" id=3] | ||
cull_mode = 1 | ||
polygon = PoolVector2Array( -6.69359, -4.72556, -2.41421, -7.46155, 2.63686, -7.3914, 6.84608, -4.58525, 6.84608, -1.56864, 2.5667, 1.30767, -2.55452, 1.30767, -6.69359, -1.70895 ) | ||
|
||
[node name="Cauldron" type="StaticBody2D"] | ||
|
||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."] | ||
position = Vector2( 8, 8 ) | ||
frames = SubResource( 1 ) | ||
frame = 2 | ||
playing = true | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
visible = false | ||
position = Vector2( 8, 11.851 ) | ||
rotation = -1.57079 | ||
shape = SubResource( 2 ) | ||
|
||
[node name="Light" parent="." instance=ExtResource( 2 )] | ||
position = Vector2( 8, 4.906 ) | ||
texture_scale = 0.01 | ||
|
||
[node name="LightOccluder2D" type="LightOccluder2D" parent="."] | ||
show_behind_parent = true | ||
position = Vector2( 7.99753, 7.92737 ) | ||
occluder = SubResource( 3 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends Node2D | ||
|
||
onready var animation = $AnimatedSprite | ||
|
||
func _ready(): | ||
# Switch up | ||
animation.frame = randi() % 4 | ||
animation.speed_scale = rand_range(0.9, 1.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends StaticBody2D | ||
|
||
onready var light = $Light | ||
|
||
func _on_Area2D_body_entered(body): | ||
# This should include a signal to act on the player | ||
light.enabled = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[gd_scene load_steps=8 format=2] | ||
|
||
[ext_resource path="res://Lights/Light.tscn" type="PackedScene" id=1] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Other/SmallShadow.png" type="Texture" id=2] | ||
[ext_resource path="res://Entities/Decoration/Fountain.gd" type="Script" id=3] | ||
[ext_resource path="res://Entities/Decoration/Sprites/Other/fountain.png" type="Texture" id=4] | ||
|
||
[sub_resource type="RectangleShape2D" id=1] | ||
extents = Vector2( 5.93288, 5.78033 ) | ||
|
||
[sub_resource type="OccluderPolygon2D" id=2] | ||
cull_mode = 1 | ||
polygon = PoolVector2Array( 2.14048, 13.3379, 5.51751, 11.3514, 10.4837, 11.3514, 13.5297, 13.6028, 11.6094, 15.523, 4.39183, 15.523 ) | ||
|
||
[sub_resource type="RectangleShape2D" id=3] | ||
|
||
[node name="Fountain" type="StaticBody2D"] | ||
script = ExtResource( 3 ) | ||
|
||
[node name="Sprite" type="Sprite" parent="."] | ||
position = Vector2( 8, 8 ) | ||
texture = ExtResource( 4 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
visible = false | ||
position = Vector2( 7.912, 9.945 ) | ||
shape = SubResource( 1 ) | ||
|
||
[node name="Light" parent="." instance=ExtResource( 1 )] | ||
position = Vector2( 7.98346, 4.84092 ) | ||
scale = Vector2( 2.71823, 1.8792 ) | ||
texture_scale = 0.01 | ||
color = Color( 0.529412, 0.596078, 0.913725, 1 ) | ||
energy = 1.2 | ||
|
||
[node name="LightOccluder2D" type="LightOccluder2D" parent="."] | ||
visible = false | ||
occluder = SubResource( 2 ) | ||
|
||
[node name="Shadow" type="Sprite" parent="."] | ||
position = Vector2( 8.24394, 14.1372 ) | ||
scale = Vector2( 1.88068, 1.05794 ) | ||
texture = ExtResource( 2 ) | ||
|
||
[node name="Area2D" type="Area2D" parent="."] | ||
collision_layer = 0 | ||
collision_mask = 2 | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] | ||
position = Vector2( 7.81353, 8.80678 ) | ||
shape = SubResource( 3 ) | ||
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered" flags=6] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
Entities/Decoration/Sprites/Cauldron/cauldron_blue_0.png.import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/cauldron_blue_0.png-9697eedd4e608df2d9a7876f4dd2c0b1.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Entities/Decoration/Sprites/Cauldron/cauldron_blue_0.png" | ||
dest_files=[ "res://.import/cauldron_blue_0.png-9697eedd4e608df2d9a7876f4dd2c0b1.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 | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.