mirror of
https://github.com/RYGhub/the-cold-night.git
synced 2024-11-22 04:34:19 +00:00
Merge branch 'main' of https://github.com/RYGhub/ld50
This commit is contained in:
commit
9e378d90e1
64 changed files with 781 additions and 141 deletions
|
@ -80,6 +80,11 @@ _global_script_classes=[ {
|
||||||
"path": "res://src/behaviours/graphics/RandomRotationOnReady.gd"
|
"path": "res://src/behaviours/graphics/RandomRotationOnReady.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "Node",
|
"base": "Node",
|
||||||
|
"class": "RapidFire",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://src/pickups/effects/RapidFire.gd"
|
||||||
|
}, {
|
||||||
|
"base": "Node",
|
||||||
"class": "SetSpawnedGoalTo",
|
"class": "SetSpawnedGoalTo",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://src/behaviours/targeting/SetSpawnedGoalTo.gd"
|
"path": "res://src/behaviours/targeting/SetSpawnedGoalTo.gd"
|
||||||
|
@ -119,6 +124,7 @@ _global_script_class_icons={
|
||||||
"PlayerMovement": "",
|
"PlayerMovement": "",
|
||||||
"RNG": "",
|
"RNG": "",
|
||||||
"RandomRotationOnReady": "",
|
"RandomRotationOnReady": "",
|
||||||
|
"RapidFire": "",
|
||||||
"SetSpawnedGoalTo": "",
|
"SetSpawnedGoalTo": "",
|
||||||
"SpawnEveryPeriod": "",
|
"SpawnEveryPeriod": "",
|
||||||
"SpawnOnShoot": "",
|
"SpawnOnShoot": "",
|
||||||
|
@ -129,7 +135,7 @@ _global_script_class_icons={
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="LD50"
|
config/name="LD50"
|
||||||
run/main_scene="res://src/levels/Game.tscn"
|
run/main_scene="res://src/levels/MainMenu.tscn"
|
||||||
|
|
||||||
[audio]
|
[audio]
|
||||||
|
|
||||||
|
@ -189,6 +195,7 @@ player_shoot={
|
||||||
2d_physics/layer_2="Damageable"
|
2d_physics/layer_2="Damageable"
|
||||||
2d_physics/layer_3="Projectiles"
|
2d_physics/layer_3="Projectiles"
|
||||||
2d_physics/layer_4="UI"
|
2d_physics/layer_4="UI"
|
||||||
|
2d_physics/layer_5="Pickups"
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
extends Node
|
|
||||||
|
|
||||||
|
|
||||||
export var bullet: PackedScene
|
|
||||||
export var bullet_container_node_path: String
|
|
||||||
|
|
||||||
|
|
||||||
onready var bullet_container_node: Node = get_node(bullet_container_node_path)
|
|
||||||
onready var source: Node2D = get_parent()
|
|
||||||
|
|
||||||
|
|
||||||
var _timer : Timer = null
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
_timer = Timer.new()
|
|
||||||
add_child(_timer)
|
|
||||||
_timer.set_wait_time(0.3)
|
|
||||||
_timer.set_one_shot(true)
|
|
||||||
_timer.start()
|
|
||||||
|
|
||||||
func _process(_delta):
|
|
||||||
print(_timer.get_time_left())
|
|
||||||
if Input.is_action_just_pressed("player_shoot") and _timer.get_time_left()==0:
|
|
||||||
shoot()
|
|
||||||
|
|
||||||
#restart timer
|
|
||||||
_timer.set_wait_time(0.3)
|
|
||||||
_timer.set_one_shot(true)
|
|
||||||
_timer.start()
|
|
||||||
|
|
||||||
|
|
||||||
func shoot():
|
|
||||||
var new_bullet = bullet.instance()
|
|
||||||
new_bullet.set_position(source.global_position)
|
|
||||||
bullet_container_node.add_child(new_bullet)
|
|
||||||
var rotation = new_bullet.get_angle_to(source.get_global_mouse_position())
|
|
||||||
new_bullet.set_rotation(rotation)
|
|
||||||
new_bullet.get_node("Ownership").entity_owner = source
|
|
||||||
new_bullet.add_collision_exception_with(source)
|
|
|
@ -3,18 +3,17 @@ class_name AttractedToMovement
|
||||||
|
|
||||||
|
|
||||||
signal moving_in_direction(direction)
|
signal moving_in_direction(direction)
|
||||||
signal touching_goal
|
signal touching_goal(who)
|
||||||
signal goal_reached
|
signal goal_reached(who)
|
||||||
|
|
||||||
|
|
||||||
export var movement_per_second: float
|
export var movement_per_second: float
|
||||||
export var goal_path: NodePath
|
|
||||||
|
|
||||||
|
|
||||||
onready var parent: KinematicBody2D = get_parent()
|
onready var parent: KinematicBody2D = get_parent()
|
||||||
onready var goal: PhysicsBody2D = get_node(goal_path) if goal_path else null
|
|
||||||
|
|
||||||
|
|
||||||
|
var goal: Node2D = null
|
||||||
var _goal_reached_triggered: bool = false
|
var _goal_reached_triggered: bool = false
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,9 +24,9 @@ func move():
|
||||||
for slide_no in parent.get_slide_count():
|
for slide_no in parent.get_slide_count():
|
||||||
var slide = parent.get_slide_collision(slide_no)
|
var slide = parent.get_slide_collision(slide_no)
|
||||||
if slide.collider == goal:
|
if slide.collider == goal:
|
||||||
emit_signal("touching_goal")
|
emit_signal("touching_goal", self)
|
||||||
if not _goal_reached_triggered:
|
if not _goal_reached_triggered:
|
||||||
emit_signal("goal_reached")
|
emit_signal("goal_reached", self)
|
||||||
_goal_reached_triggered = true
|
_goal_reached_triggered = true
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,9 @@ extends Node
|
||||||
class_name PlayerMovement
|
class_name PlayerMovement
|
||||||
|
|
||||||
|
|
||||||
|
signal moving_in_direction(direction)
|
||||||
|
|
||||||
|
|
||||||
export var movement_per_second: float
|
export var movement_per_second: float
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,4 +22,5 @@ func _physics_process(_delta):
|
||||||
if direction.length() > 1:
|
if direction.length() > 1:
|
||||||
direction.normalized()
|
direction.normalized()
|
||||||
|
|
||||||
|
emit_signal("moving_in_direction", direction)
|
||||||
var _motion: Vector2 = parent.move_and_slide(direction * movement_per_second, Vector2.ZERO)
|
var _motion: Vector2 = parent.move_and_slide(direction * movement_per_second, Vector2.ZERO)
|
||||||
|
|
|
@ -13,21 +13,15 @@ onready var rng = get_tree().root.get_node("Game/RNG").rng
|
||||||
|
|
||||||
|
|
||||||
func teleport():
|
func teleport():
|
||||||
var random = rng.randi_range(1, 4)
|
var new_position = Vector2(
|
||||||
|
rng.randf_range(0, bounds.x),
|
||||||
var new_position
|
rng.randf_range(0, bounds.y)
|
||||||
if random == 1:
|
)
|
||||||
# Left
|
|
||||||
new_position = Vector2(0, rng.randf_range(0, bounds.y))
|
|
||||||
elif random == 2:
|
|
||||||
# Right
|
|
||||||
new_position = Vector2(bounds.x, rng.randf_range(0, bounds.y))
|
|
||||||
elif random == 3:
|
|
||||||
# Top
|
|
||||||
new_position = Vector2(rng.randf_range(0, bounds.x), 0)
|
|
||||||
else:
|
|
||||||
# Bottom
|
|
||||||
new_position = Vector2(rng.randf_range(0, bounds.y), bounds.y)
|
|
||||||
|
|
||||||
parent.set_position(new_position)
|
parent.set_position(new_position)
|
||||||
emit_signal("teleported", parent.position)
|
emit_signal("teleported", parent.position)
|
||||||
|
|
||||||
|
|
||||||
|
func _handle_spawned(_node):
|
||||||
|
teleport()
|
||||||
|
|
|
@ -13,10 +13,25 @@ onready var rng = get_tree().root.get_node("Game/RNG").rng
|
||||||
|
|
||||||
|
|
||||||
func teleport():
|
func teleport():
|
||||||
var new_position = Vector2(
|
var random = rng.randi_range(1, 4)
|
||||||
rng.randf_range(0, bounds.x),
|
|
||||||
rng.randf_range(0, bounds.y)
|
var new_position
|
||||||
)
|
if random == 1:
|
||||||
|
# Left
|
||||||
|
new_position = Vector2(0, rng.randf_range(0, bounds.y))
|
||||||
|
elif random == 2:
|
||||||
|
# Right
|
||||||
|
new_position = Vector2(bounds.x, rng.randf_range(0, bounds.y))
|
||||||
|
elif random == 3:
|
||||||
|
# Top
|
||||||
|
new_position = Vector2(rng.randf_range(0, bounds.x), 0)
|
||||||
|
else:
|
||||||
|
# Bottom
|
||||||
|
new_position = Vector2(rng.randf_range(0, bounds.x), bounds.y)
|
||||||
|
|
||||||
parent.set_position(new_position)
|
parent.set_position(new_position)
|
||||||
emit_signal("teleported", parent.position)
|
emit_signal("teleported", parent.position)
|
||||||
|
|
||||||
|
|
||||||
|
func _handle_spawned(_node):
|
||||||
|
teleport()
|
||||||
|
|
|
@ -24,7 +24,7 @@ func select_drop() -> PackedScene:
|
||||||
|
|
||||||
var result = rng.randf_range(0.0, total_weights)
|
var result = rng.randf_range(0.0, total_weights)
|
||||||
|
|
||||||
for i in range(loot_types.len()):
|
for i in range(len(loot_types)):
|
||||||
var loot_type = loot_types[i]
|
var loot_type = loot_types[i]
|
||||||
var loot_weight = loot_weights[i]
|
var loot_weight = loot_weights[i]
|
||||||
result -= loot_weight
|
result -= loot_weight
|
||||||
|
|
|
@ -8,6 +8,7 @@ signal shot(bullet)
|
||||||
export var bullet: PackedScene
|
export var bullet: PackedScene
|
||||||
export var cooldown: float setget set_cooldown, get_cooldown
|
export var cooldown: float setget set_cooldown, get_cooldown
|
||||||
export var rapid_fire: bool
|
export var rapid_fire: bool
|
||||||
|
export var angle_offset: float
|
||||||
|
|
||||||
|
|
||||||
onready var parent: Node2D = get_parent()
|
onready var parent: Node2D = get_parent()
|
||||||
|
@ -25,7 +26,7 @@ func shoot(target):
|
||||||
var node = bullet.instance()
|
var node = bullet.instance()
|
||||||
container.add_child(node)
|
container.add_child(node)
|
||||||
node.set_position(global_position)
|
node.set_position(global_position)
|
||||||
node.set_rotation(node.get_angle_to(target))
|
node.set_rotation(node.get_angle_to(target) + angle_offset)
|
||||||
node.get_node("Ownership").entity_owner = parent
|
node.get_node("Ownership").entity_owner = parent
|
||||||
node.add_collision_exception_with(parent)
|
node.add_collision_exception_with(parent)
|
||||||
emit_signal("shot")
|
emit_signal("shot")
|
||||||
|
|
13
src/behaviours/targeting/SetGoalReachedConsequences.gd
Normal file
13
src/behaviours/targeting/SetGoalReachedConsequences.gd
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
signal goal_reached(who)
|
||||||
|
|
||||||
|
|
||||||
|
func set_consequences(node):
|
||||||
|
var movement = node.get_node("AttractedToMovement")
|
||||||
|
movement.connect("goal_reached", self, "_on_goal_reached")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_goal_reached(who):
|
||||||
|
emit_signal("goal_reached", who)
|
6
src/behaviours/targeting/SetGoalReachedConsequences.tscn
Normal file
6
src/behaviours/targeting/SetGoalReachedConsequences.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/behaviours/targeting/SetGoalReachedConsequences.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="SetGoalReachedConsequences" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
|
@ -3,8 +3,9 @@ class_name SetSpawnedGoalTo
|
||||||
|
|
||||||
|
|
||||||
export var goal_path: NodePath
|
export var goal_path: NodePath
|
||||||
|
onready var goal = get_node(goal_path)
|
||||||
|
|
||||||
|
|
||||||
func set_goal(node):
|
func set_goal(node):
|
||||||
var movement = node.get_node("AttractedToMovement")
|
var movement = node.get_node("AttractedToMovement")
|
||||||
movement.goal = get_node(goal_path)
|
movement.goal = goal
|
||||||
|
|
|
@ -12,10 +12,12 @@ export var lit_damage: int = 5
|
||||||
func _on_Flammable_caught_fire():
|
func _on_Flammable_caught_fire():
|
||||||
$Shape/Sprite.texture = lit_texture
|
$Shape/Sprite.texture = lit_texture
|
||||||
$Damaging.damage = lit_damage
|
$Damaging.damage = lit_damage
|
||||||
|
$Damaging.destroy_on_damage = false
|
||||||
$Light.visible = true
|
$Light.visible = true
|
||||||
|
|
||||||
|
|
||||||
func _on_Flammable_extinguished_fire():
|
func _on_Flammable_extinguished_fire():
|
||||||
$Shape/Sprite.texture = dim_texture
|
$Shape/Sprite.texture = dim_texture
|
||||||
$Damaging.damage = dim_damage
|
$Damaging.damage = dim_damage
|
||||||
|
$Damaging.destroy_on_damage = true
|
||||||
$Light.visible = false
|
$Light.visible = false
|
||||||
|
|
|
@ -9,3 +9,5 @@
|
||||||
alliance = -1
|
alliance = -1
|
||||||
|
|
||||||
[node name="DropLoot" parent="." index="2" instance=ExtResource( 1 )]
|
[node name="DropLoot" parent="." index="2" instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
[connection signal="dead" from="Damageable" to="DropLoot" method="create_drop"]
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
[gd_scene load_steps=11 format=2]
|
[gd_scene load_steps=13 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/entities/enemies/EnemySnowmanLeft.png" type="Texture" id=1]
|
[ext_resource path="res://src/entities/enemies/EnemySnowmanLeft.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/behaviours/movement/ErraticMovement.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://src/pickups/BranchPickup.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://src/behaviours/movement/AttractedToMovement.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://src/behaviours/movement/AttractedToMovement.tscn" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://src/entities/enemies/AbstractEnemy.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://src/entities/enemies/AbstractEnemy.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://src/pickups/RapidFirePickup.tscn" type="PackedScene" id=5]
|
||||||
[ext_resource path="res://src/entities/enemies/EnemySnowmanBack.png" type="Texture" id=6]
|
[ext_resource path="res://src/entities/enemies/EnemySnowmanBack.png" type="Texture" id=6]
|
||||||
[ext_resource path="res://src/entities/enemies/EnemySnowmanFront.png" type="Texture" id=7]
|
[ext_resource path="res://src/entities/enemies/EnemySnowmanFront.png" type="Texture" id=7]
|
||||||
[ext_resource path="res://src/entities/enemies/EnemySnowmanRight.png" type="Texture" id=8]
|
[ext_resource path="res://src/entities/enemies/EnemySnowmanRight.png" type="Texture" id=8]
|
||||||
[ext_resource path="res://src/behaviours/graphics/FourSidedSprite.tscn" type="PackedScene" id=9]
|
[ext_resource path="res://src/behaviours/graphics/FourSidedSprite.tscn" type="PackedScene" id=9]
|
||||||
|
[ext_resource path="res://src/sounds/Death.mp3" type="AudioStream" id=10]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id=1]
|
[sub_resource type="CapsuleShape2D" id=1]
|
||||||
radius = 9.0
|
radius = 9.0
|
||||||
|
@ -45,8 +47,15 @@ shape = SubResource( 1 )
|
||||||
frames = SubResource( 2 )
|
frames = SubResource( 2 )
|
||||||
animation = "down"
|
animation = "down"
|
||||||
|
|
||||||
[node name="ErraticMovement" parent="." index="4" instance=ExtResource( 2 )]
|
[node name="DropLoot" parent="." index="3"]
|
||||||
|
loot_types = [ null, ExtResource( 2 ), ExtResource( 5 ) ]
|
||||||
|
loot_weights = [ 1.0, 1.0, 0.1 ]
|
||||||
|
|
||||||
[node name="AttractedToMovement" parent="." index="5" instance=ExtResource( 3 )]
|
[node name="AttractedToMovement" parent="." index="4" instance=ExtResource( 3 )]
|
||||||
|
|
||||||
|
[node name="MeltSound" parent="." index="5"]
|
||||||
|
stream = ExtResource( 10 )
|
||||||
|
|
||||||
|
[connection signal="dead" from="Damageable" to="DropLoot" method="create_drop"]
|
||||||
|
[connection signal="dead" from="Damageable" to="MeltSound" method="_on_Damageable_dead"]
|
||||||
[connection signal="moving_in_direction" from="AttractedToMovement" to="Shape/FourSidedSprite" method="turn"]
|
[connection signal="moving_in_direction" from="AttractedToMovement" to="Shape/FourSidedSprite" method="turn"]
|
||||||
|
|
BIN
src/entities/fire/Fire-v1-f0000.png
(Stored with Git LFS)
BIN
src/entities/fire/Fire-v1-f0000.png
(Stored with Git LFS)
Binary file not shown.
BIN
src/entities/fire/Fire-v1-f0002.png
(Stored with Git LFS)
BIN
src/entities/fire/Fire-v1-f0002.png
(Stored with Git LFS)
Binary file not shown.
BIN
src/entities/fire/Fire-v1-f0004.png
(Stored with Git LFS)
BIN
src/entities/fire/Fire-v1-f0004.png
(Stored with Git LFS)
Binary file not shown.
BIN
src/entities/fire/Fire-v1-f0006.png
(Stored with Git LFS)
BIN
src/entities/fire/Fire-v1-f0006.png
(Stored with Git LFS)
Binary file not shown.
BIN
src/entities/fire/Fire-v1-f0008.png
(Stored with Git LFS)
BIN
src/entities/fire/Fire-v1-f0008.png
(Stored with Git LFS)
Binary file not shown.
BIN
src/entities/fire/Fire-v1-f0010.png
(Stored with Git LFS)
BIN
src/entities/fire/Fire-v1-f0010.png
(Stored with Git LFS)
Binary file not shown.
|
@ -5,6 +5,8 @@ export var intensity: float = 1.0 setget set_intensity
|
||||||
export var change_per_second: float = - 1.0 / 60.0
|
export var change_per_second: float = - 1.0 / 60.0
|
||||||
export var min_intensity: float = 0
|
export var min_intensity: float = 0
|
||||||
export var max_intensity: float = INF
|
export var max_intensity: float = INF
|
||||||
|
export var enemy_touch_penalty = 0.1
|
||||||
|
|
||||||
|
|
||||||
signal intensity_changed(value)
|
signal intensity_changed(value)
|
||||||
signal intensity_at_max
|
signal intensity_at_max
|
||||||
|
@ -47,3 +49,9 @@ func _on_Flame_body_entered(body: PhysicsBody2D):
|
||||||
var flammable = body.get_node("Flammable")
|
var flammable = body.get_node("Flammable")
|
||||||
if flammable != null:
|
if flammable != null:
|
||||||
flammable.catch_fire()
|
flammable.catch_fire()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Enemy_goal_reached(who):
|
||||||
|
intensity -= enemy_touch_penalty
|
||||||
|
# Melt
|
||||||
|
who.queue_free()
|
||||||
|
|
35
src/entities/players/CharacterFront.png.import
Normal file
35
src/entities/players/CharacterFront.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/CharacterFront.png-845655f7c30d9b4c6e480912b353d1f6.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/entities/players/CharacterFront.png"
|
||||||
|
dest_files=[ "res://.import/CharacterFront.png-845655f7c30d9b4c6e480912b353d1f6.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
|
35
src/entities/players/CharacterFrontLeft.png.import
Normal file
35
src/entities/players/CharacterFrontLeft.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/CharacterFrontLeft.png-114f9621beadf66601a533677fac5ae7.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/entities/players/CharacterFrontLeft.png"
|
||||||
|
dest_files=[ "res://.import/CharacterFrontLeft.png-114f9621beadf66601a533677fac5ae7.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,25 +1,55 @@
|
||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/entities/players/AbstractPlayer.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://src/entities/players/AbstractPlayer.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://src/mechanics/White.png" type="Texture" id=2]
|
|
||||||
[ext_resource path="res://src/entities/bullets/ArrowAlternative.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://src/entities/bullets/ArrowAlternative.tscn" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://src/behaviours/spawning/SpawnOnShoot.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://src/behaviours/spawning/SpawnOnShoot.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://src/entities/players/CharacterFrontLeft.png" type="Texture" id=5]
|
||||||
|
[ext_resource path="res://src/entities/players/CharacterFront.png" type="Texture" id=6]
|
||||||
|
[ext_resource path="res://src/behaviours/graphics/FourSidedSprite.gd" type="Script" id=7]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="CapsuleShape2D" id=3]
|
||||||
extents = Vector2( 16, 16 )
|
radius = 9.0
|
||||||
|
height = 14.0
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=2]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ ExtResource( 5 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "left",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ ExtResource( 6 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "right",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ ExtResource( 5 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "up",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ ExtResource( 6 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "down",
|
||||||
|
"speed": 5.0
|
||||||
|
} ]
|
||||||
|
|
||||||
[node name="PhaseOnePlayer" instance=ExtResource( 1 )]
|
[node name="PhaseOnePlayer" instance=ExtResource( 1 )]
|
||||||
|
collision_layer = 19
|
||||||
|
|
||||||
[node name="Shape" type="CollisionShape2D" parent="." index="0"]
|
[node name="Shape" type="CollisionShape2D" parent="." index="0"]
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="Shape" index="0"]
|
[node name="FourSidedSprite" type="AnimatedSprite" parent="Shape" index="0"]
|
||||||
texture = ExtResource( 2 )
|
frames = SubResource( 2 )
|
||||||
|
animation = "left"
|
||||||
|
script = ExtResource( 7 )
|
||||||
|
|
||||||
[node name="Listener" type="Listener2D" parent="." index="1"]
|
[node name="Listener" type="Listener2D" parent="." index="1"]
|
||||||
current = true
|
current = true
|
||||||
|
|
||||||
[node name="SpawnOnShoot" parent="." index="2" instance=ExtResource( 4 )]
|
[node name="SpawnOnShoot" parent="." index="2" instance=ExtResource( 4 )]
|
||||||
bullet = ExtResource( 3 )
|
bullet = ExtResource( 3 )
|
||||||
cooldown = 0.1
|
cooldown = 0.2
|
||||||
rapid_fire = true
|
|
||||||
|
[connection signal="moving_in_direction" from="PlayerMovement" to="Shape/FourSidedSprite" method="turn"]
|
||||||
|
|
|
@ -12,3 +12,7 @@ func set_survival_seconds(value):
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
set_survival_seconds(survival_seconds + delta)
|
set_survival_seconds(survival_seconds + delta)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Fire_intensity_reached_min():
|
||||||
|
print("Game over!")
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,16 +1,11 @@
|
||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
func _ready():
|
||||||
pass # Replace with function body.
|
for child in get_children():
|
||||||
|
if child.name == "Play":
|
||||||
|
get_node(child.name).connect("pressed", self, "change_scn")
|
||||||
|
|
||||||
|
func change_scn():
|
||||||
|
get_tree().change_scene("res://src/levels/Game.tscn")
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
|
|
@ -1,11 +1,36 @@
|
||||||
[gd_scene load_steps=2 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/levels/MainMenu.gd" type="Script" id=1]
|
[ext_resource path="res://src/levels/MainMenu.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://src/ui/Title.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://src/ui/PlayButton.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://src/ui/fonts/SourceSerifPro-Light.ttf" type="DynamicFontData" id=4]
|
||||||
|
[ext_resource path="res://src/entities/fire/Fire.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 70
|
||||||
|
font_data = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="MainMenu" type="Node2D"]
|
[node name="MainMenu" type="Node2D"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Panel" type="Panel" parent="."]
|
||||||
margin_right = 40.0
|
margin_right = 1280.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 720.0
|
||||||
text = "Hello world!"
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="Panel"]
|
||||||
|
position = Vector2( 640.881, 360.696 )
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Fire" parent="Panel" instance=ExtResource( 5 )]
|
||||||
|
position = Vector2( 421, 365 )
|
||||||
|
scale = Vector2( 4, 4 )
|
||||||
|
|
||||||
|
[node name="Play" type="Button" parent="."]
|
||||||
|
margin_left = 944.0
|
||||||
|
margin_top = 489.0
|
||||||
|
margin_right = 1210.0
|
||||||
|
margin_bottom = 615.0
|
||||||
|
custom_fonts/font = SubResource( 1 )
|
||||||
|
text = "Play"
|
||||||
|
icon = ExtResource( 3 )
|
||||||
|
flat = true
|
||||||
|
|
|
@ -7,6 +7,7 @@ export var bell_min: float = 0.20
|
||||||
export var bell_max: float = 0.60
|
export var bell_max: float = 0.60
|
||||||
export var drum_min: float = 0.40
|
export var drum_min: float = 0.40
|
||||||
export var drum_max: float = 0.80
|
export var drum_max: float = 0.80
|
||||||
|
export var muted: bool setget set_mute, get_mute
|
||||||
|
|
||||||
|
|
||||||
func _on_Fire_intensity_changed(value):
|
func _on_Fire_intensity_changed(value):
|
||||||
|
@ -14,7 +15,20 @@ func _on_Fire_intensity_changed(value):
|
||||||
$Choir.bus = "Master" if $Choir.volume_db > -60 else "Mute"
|
$Choir.bus = "Master" if $Choir.volume_db > -60 else "Mute"
|
||||||
|
|
||||||
$Bell.volume_db = (smoothstep(bell_min, bell_max, value) - 1) * 60
|
$Bell.volume_db = (smoothstep(bell_min, bell_max, value) - 1) * 60
|
||||||
$Bell.bus = "Master" if $Choir.volume_db > -60 else "Mute"
|
$Bell.bus = "Master" if $Bell.volume_db > -60 else "Mute"
|
||||||
|
|
||||||
$Drum.volume_db = (smoothstep(drum_min, drum_max, value) - 1) * 60
|
$Drum.volume_db = (smoothstep(drum_min, drum_max, value) - 1) * 60
|
||||||
$Drum.bus = "Master" if $Choir.volume_db > -60 else "Mute"
|
$Drum.bus = "Master" if $Drum.volume_db > -60 else "Mute"
|
||||||
|
|
||||||
|
|
||||||
|
func set_mute(value):
|
||||||
|
var index = AudioServer.get_bus_index("Master")
|
||||||
|
AudioServer.set_bus_mute(index, value)
|
||||||
|
|
||||||
|
func get_mute():
|
||||||
|
var index = AudioServer.get_bus_index("Master")
|
||||||
|
return AudioServer.is_bus_mute(index)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_MuteButton_pressed():
|
||||||
|
set_mute(not get_mute())
|
||||||
|
|
|
@ -20,7 +20,7 @@ compress/hdr_mode=0
|
||||||
compress/bptc_ldr=0
|
compress/bptc_ldr=0
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
flags/repeat=0
|
flags/repeat=0
|
||||||
flags/filter=true
|
flags/filter=false
|
||||||
flags/mipmaps=false
|
flags/mipmaps=false
|
||||||
flags/anisotropic=false
|
flags/anisotropic=false
|
||||||
flags/srgb=2
|
flags/srgb=2
|
||||||
|
|
35
src/mechanics/EnemySpiderSanta.png.import
Normal file
35
src/mechanics/EnemySpiderSanta.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/EnemySpiderSanta.png-eac0456ac0f4bbe49e411b81e6d559f8.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/mechanics/EnemySpiderSanta.png"
|
||||||
|
dest_files=[ "res://.import/EnemySpiderSanta.png-eac0456ac0f4bbe49e411b81e6d559f8.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
|
|
@ -7,4 +7,5 @@
|
||||||
|
|
||||||
[node name="TeleportToScreenEdge" parent="." index="1" instance=ExtResource( 2 )]
|
[node name="TeleportToScreenEdge" parent="." index="1" instance=ExtResource( 2 )]
|
||||||
|
|
||||||
|
[connection signal="spawned" from="." to="TeleportToScreenEdge" method="_handle_spawned"]
|
||||||
[connection signal="timeout" from="Period" to="TeleportToScreenEdge" method="teleport"]
|
[connection signal="timeout" from="Period" to="TeleportToScreenEdge" method="teleport"]
|
||||||
|
|
35
src/mechanics/Snowflake.png.import
Normal file
35
src/mechanics/Snowflake.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Snowflake.png-e248e372833c2aa730b5b6d333276836.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/mechanics/Snowflake.png"
|
||||||
|
dest_files=[ "res://.import/Snowflake.png-e248e372833c2aa730b5b6d333276836.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
|
BIN
src/music/BossDrum.mp3
(Stored with Git LFS)
Normal file
BIN
src/music/BossDrum.mp3
(Stored with Git LFS)
Normal file
Binary file not shown.
15
src/music/BossDrum.mp3.import
Normal file
15
src/music/BossDrum.mp3.import
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
path="res://.import/BossDrum.mp3-2bfdfe7d88295d55ceececa4a0192925.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/music/BossDrum.mp3"
|
||||||
|
dest_files=[ "res://.import/BossDrum.mp3-2bfdfe7d88295d55ceececa4a0192925.mp3str" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=true
|
||||||
|
loop_offset=0
|
BIN
src/music/BossGuitar.mp3
(Stored with Git LFS)
Normal file
BIN
src/music/BossGuitar.mp3
(Stored with Git LFS)
Normal file
Binary file not shown.
15
src/music/BossGuitar.mp3.import
Normal file
15
src/music/BossGuitar.mp3.import
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
path="res://.import/BossGuitar.mp3-e2de794fd4225b0cdd668c1932985776.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/music/BossGuitar.mp3"
|
||||||
|
dest_files=[ "res://.import/BossGuitar.mp3-e2de794fd4225b0cdd668c1932985776.mp3str" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=true
|
||||||
|
loop_offset=0
|
16
src/pickups/BranchPickup.tscn
Normal file
16
src/pickups/BranchPickup.tscn
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/pickups/effects/ChangeFireIntensity.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://src/pickups/Pickup.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
|
[node name="BranchPickup" instance=ExtResource( 2 )]
|
||||||
|
scale = Vector2( 0.5, 0.5 )
|
||||||
|
duration_seconds = 0.4
|
||||||
|
despawn_seconds = 15.0
|
||||||
|
|
||||||
|
[node name="Despawn" parent="." index="2"]
|
||||||
|
autostart = true
|
||||||
|
|
||||||
|
[node name="ChangeFireIntensity" parent="." index="3" instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
[connection signal="picked_up" from="." to="ChangeFireIntensity" method="_on_picked_up"]
|
|
@ -1,9 +1,8 @@
|
||||||
extends Area2D
|
extends Area2D
|
||||||
|
|
||||||
|
|
||||||
export var sprite: Texture = preload("res://src/mechanics/White.png") setget set_sprite, get_sprite
|
export var duration_seconds: float setget set_duration, get_duration
|
||||||
export var duration_seconds: float = 1.0 setget set_duration, get_duration
|
export var despawn_seconds: float setget set_despawn, get_despawn
|
||||||
export var despawn_seconds: float = INF setget set_despawn, get_despawn
|
|
||||||
|
|
||||||
signal picked_up
|
signal picked_up
|
||||||
signal expired
|
signal expired
|
||||||
|
@ -11,20 +10,13 @@ signal despawned
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
set_sprite(sprite)
|
|
||||||
set_duration(duration_seconds)
|
set_duration(duration_seconds)
|
||||||
set_despawn(despawn_seconds)
|
set_despawn(despawn_seconds)
|
||||||
|
|
||||||
|
|
||||||
func set_sprite(value):
|
|
||||||
$Shape/Sprite.texture = value
|
|
||||||
|
|
||||||
func get_sprite():
|
|
||||||
return $Shape/Sprite.texture
|
|
||||||
|
|
||||||
|
|
||||||
func set_duration(value):
|
func set_duration(value):
|
||||||
$Duration.wait_time = value
|
if value > 0:
|
||||||
|
$Duration.wait_time = value
|
||||||
|
|
||||||
func get_duration():
|
func get_duration():
|
||||||
return $Duration.wait_time
|
return $Duration.wait_time
|
||||||
|
@ -35,8 +27,8 @@ func _on_Duration_timeout():
|
||||||
|
|
||||||
|
|
||||||
func set_despawn(value):
|
func set_despawn(value):
|
||||||
$Despawn.wait_time = value
|
if value > 0:
|
||||||
$Despawn.start()
|
$Despawn.wait_time = value
|
||||||
|
|
||||||
func get_despawn():
|
func get_despawn():
|
||||||
return $Despawn.wait_time
|
return $Despawn.wait_time
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/entities/behaviours/SpriteRandomRotation.gd" type="Script" id=1]
|
[ext_resource path="res://src/behaviours/graphics/RandomRotationOnReady.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://src/pickups/Branch1.png" type="Texture" id=2]
|
[ext_resource path="res://src/pickups/Branch1.png" type="Texture" id=2]
|
||||||
[ext_resource path="res://src/entities/Pickup.gd" type="Script" id=3]
|
[ext_resource path="res://src/pickups/Pickup.gd" type="Script" id=3]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 16, 16 )
|
extents = Vector2( 16, 16 )
|
||||||
|
|
||||||
[node name="Pickup" type="Area2D"]
|
[node name="Pickup" type="Area2D"]
|
||||||
|
collision_layer = 16
|
||||||
|
collision_mask = 16
|
||||||
input_pickable = false
|
input_pickable = false
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
|
|
18
src/pickups/RapidFirePickup.tscn
Normal file
18
src/pickups/RapidFirePickup.tscn
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/pickups/effects/RapidFire.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://src/pickups/WeaponCrossbow.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://src/pickups/Pickup.tscn" type="PackedScene" id=3]
|
||||||
|
|
||||||
|
[node name="RapidFirePickup" instance=ExtResource( 3 )]
|
||||||
|
scale = Vector2( 0.5, 0.5 )
|
||||||
|
duration_seconds = inf
|
||||||
|
|
||||||
|
[node name="Sprite" parent="Shape" index="0"]
|
||||||
|
scale = Vector2( 2, 2 )
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="RapidFire" parent="." index="3" instance=ExtResource( 1 )]
|
||||||
|
new_cooldown = 0.1
|
||||||
|
|
||||||
|
[connection signal="picked_up" from="." to="RapidFire" method="_on_picked_up"]
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/WeaponCrossbow.png-0a9cc264e092ccff57799323e11448eb.stex"
|
path="res://.import/WeaponCrossbow.png-e19361cc3a5a60e770b810055c1aa183.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://src/mechanics/WeaponCrossbow.png"
|
source_file="res://src/pickups/WeaponCrossbow.png"
|
||||||
dest_files=[ "res://.import/WeaponCrossbow.png-0a9cc264e092ccff57799323e11448eb.stex" ]
|
dest_files=[ "res://.import/WeaponCrossbow.png-e19361cc3a5a60e770b810055c1aa183.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ compress/hdr_mode=0
|
||||||
compress/bptc_ldr=0
|
compress/bptc_ldr=0
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
flags/repeat=0
|
flags/repeat=0
|
||||||
flags/filter=true
|
flags/filter=false
|
||||||
flags/mipmaps=false
|
flags/mipmaps=false
|
||||||
flags/anisotropic=false
|
flags/anisotropic=false
|
||||||
flags/srgb=2
|
flags/srgb=2
|
|
@ -1,19 +1,13 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
export var target_path: NodePath = NodePath("../../Fire")
|
|
||||||
export var amount_per_second: float = 0.2
|
export var amount_per_second: float = 0.2
|
||||||
onready var target = get_node(target_path)
|
onready var target = get_tree().root.find_node("Fire", true, false)
|
||||||
onready var pickup: Area2D = get_parent()
|
onready var pickup: Area2D = get_parent()
|
||||||
|
|
||||||
var active = false
|
var active = false
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
# warning-ignore: RETURN_VALUE_DISCARDED
|
|
||||||
pickup.connect("picked_up", self, "_on_picked_up")
|
|
||||||
|
|
||||||
|
|
||||||
func _on_picked_up():
|
func _on_picked_up():
|
||||||
active = true
|
active = true
|
||||||
|
|
||||||
|
|
15
src/pickups/effects/RapidFire.gd
Normal file
15
src/pickups/effects/RapidFire.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node
|
||||||
|
class_name RapidFire
|
||||||
|
|
||||||
|
|
||||||
|
export var new_cooldown: float
|
||||||
|
|
||||||
|
onready var target = get_tree().root.find_node("PhaseOnePlayer", true, false)
|
||||||
|
onready var pickup: Area2D = get_parent()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_picked_up():
|
||||||
|
var shoot = target.get_node("SpawnOnShoot")
|
||||||
|
shoot.cooldown = new_cooldown
|
||||||
|
shoot.rapid_fire = true
|
||||||
|
|
6
src/pickups/effects/RapidFire.tscn
Normal file
6
src/pickups/effects/RapidFire.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/pickups/effects/RapidFire.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="RapidFire" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
15
src/ui/CrossbowBar.gd
Normal file
15
src/ui/CrossbowBar.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
# Declare member variables here. Examples:
|
||||||
|
# var a = 2
|
||||||
|
# var b = "text"
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func _on_picked_up():
|
||||||
|
print ("a")
|
23
src/ui/CrossbowBar.tscn
Normal file
23
src/ui/CrossbowBar.tscn
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/ui/LifeBarBg.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://src/pickups/WeaponCrossbow.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://src/ui/LifeBarFg.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://src/ui/CrossbowBar.gd" type="Script" id=4]
|
||||||
|
|
||||||
|
[node name="CrossbowBar" type="Node"]
|
||||||
|
script = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
scale = Vector2( 3, 3 )
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="TextureProgress" type="TextureProgress" parent="."]
|
||||||
|
margin_left = 28.0
|
||||||
|
margin_top = -24.0
|
||||||
|
margin_right = 318.0
|
||||||
|
margin_bottom = 25.0
|
||||||
|
value = 100.0
|
||||||
|
texture_under = ExtResource( 1 )
|
||||||
|
texture_progress = ExtResource( 3 )
|
||||||
|
texture_progress_offset = Vector2( 2, 0 )
|
BIN
src/ui/LifeBarBg.png
(Stored with Git LFS)
Normal file
BIN
src/ui/LifeBarBg.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/LifeBarBg.png.import
Normal file
35
src/ui/LifeBarBg.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/LifeBarBg.png-99f7fc4234c2ec6ac697cc824f58880b.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/LifeBarBg.png"
|
||||||
|
dest_files=[ "res://.import/LifeBarBg.png-99f7fc4234c2ec6ac697cc824f58880b.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
|
BIN
src/ui/LifeBarFg.png
(Stored with Git LFS)
Normal file
BIN
src/ui/LifeBarFg.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/LifeBarFg.png.import
Normal file
35
src/ui/LifeBarFg.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/LifeBarFg.png-0d39793826fe9b1367d14793755cf28a.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/LifeBarFg.png"
|
||||||
|
dest_files=[ "res://.import/LifeBarFg.png-0d39793826fe9b1367d14793755cf28a.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
|
BIN
src/ui/Music_off.png
(Stored with Git LFS)
Normal file
BIN
src/ui/Music_off.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/Music_off.png.import
Normal file
35
src/ui/Music_off.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Music_off.png-27b13d35b03a178cf5a3bbf66101607e.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/Music_off.png"
|
||||||
|
dest_files=[ "res://.import/Music_off.png-27b13d35b03a178cf5a3bbf66101607e.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
|
BIN
src/ui/Music_on.png
(Stored with Git LFS)
Normal file
BIN
src/ui/Music_on.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/Music_on.png.import
Normal file
35
src/ui/Music_on.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Music_on.png-a4e74b2de0c60b71ef58425ddb79e339.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/Music_on.png"
|
||||||
|
dest_files=[ "res://.import/Music_on.png-a4e74b2de0c60b71ef58425ddb79e339.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
|
BIN
src/ui/PlayButton.png
(Stored with Git LFS)
Normal file
BIN
src/ui/PlayButton.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/PlayButton.png.import
Normal file
35
src/ui/PlayButton.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/PlayButton.png-bbb75720f98ee0da7cc56e3bae2f00bf.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/PlayButton.png"
|
||||||
|
dest_files=[ "res://.import/PlayButton.png-bbb75720f98ee0da7cc56e3bae2f00bf.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
|
BIN
src/ui/Title.png
(Stored with Git LFS)
Normal file
BIN
src/ui/Title.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/Title.png.import
Normal file
35
src/ui/Title.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/Title.png"
|
||||||
|
dest_files=[ "res://.import/Title.png-eddaf0247c16f2cd01805f96e728b10b.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
|
BIN
src/ui/UIBar.png
(Stored with Git LFS)
Normal file
BIN
src/ui/UIBar.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
src/ui/UIBar.png.import
Normal file
35
src/ui/UIBar.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/UIBar.png-1a0464279903795260a97a88d660c35b.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/ui/UIBar.png"
|
||||||
|
dest_files=[ "res://.import/UIBar.png-1a0464279903795260a97a88d660c35b.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
|
Loading…
Reference in a new issue