initial commit
This commit is contained in:
commit
35bb9bb38f
46 changed files with 1243 additions and 0 deletions
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
||||||
|
.nomedia
|
||||||
|
|
||||||
|
# Godot-specific ignores
|
||||||
|
.import/
|
||||||
|
export.cfg
|
||||||
|
export_credentials.cfg
|
||||||
|
|
||||||
|
# Imported translations (automatically generated from CSV files)
|
||||||
|
*.translation
|
||||||
|
|
||||||
|
# Mono-specific ignores
|
||||||
|
.mono/
|
||||||
|
data_*/
|
||||||
|
mono_crash.*.json
|
||||||
|
Build
|
||||||
|
.DS_Store
|
24
Bullet.gd
Normal file
24
Bullet.gd
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
var velocity : Vector2 = Vector2.ZERO
|
||||||
|
var lifetime : float = 3.0
|
||||||
|
const speed = 300
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
||||||
|
|
||||||
|
func init(p_velocity : Vector2):
|
||||||
|
velocity = p_velocity
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
position += velocity * delta * speed
|
||||||
|
lifetime -= delta
|
||||||
|
if lifetime < 0:
|
||||||
|
queue_free()
|
||||||
|
|
||||||
|
func _on_BulletArea_body_entered(body):
|
||||||
|
if body.has_method("is_player"):
|
||||||
|
return
|
||||||
|
if body.has_method("take_damage"):
|
||||||
|
body.take_damage(1)
|
||||||
|
queue_free()
|
22
Bullet.tscn
Normal file
22
Bullet.tscn
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Bullet.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=1]
|
||||||
|
radius = 2.11994
|
||||||
|
|
||||||
|
[node name="Bullet" type="Node2D"]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 64, 0, 16, 16 )
|
||||||
|
|
||||||
|
[node name="BulletArea" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="BulletCollider" type="CollisionShape2D" parent="BulletArea"]
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="BulletArea" to="." method="_on_BulletArea_body_entered"]
|
BIN
Cabin Fever Theme.mp3
Normal file
BIN
Cabin Fever Theme.mp3
Normal file
Binary file not shown.
15
Cabin Fever Theme.mp3.import
Normal file
15
Cabin Fever Theme.mp3.import
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
path="res://.import/Cabin Fever Theme.mp3-4d02863d351f207fdbe505871583b1c8.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Cabin Fever Theme.mp3"
|
||||||
|
dest_files=[ "res://.import/Cabin Fever Theme.mp3-4d02863d351f207fdbe505871583b1c8.mp3str" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=true
|
||||||
|
loop_offset=0
|
22
GUI.gd
Normal file
22
GUI.gd
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
extends MarginContainer
|
||||||
|
|
||||||
|
|
||||||
|
onready var ammo = $HB/Ammo
|
||||||
|
onready var hp = $HB/HP
|
||||||
|
onready var game_over_panel = $PopupPanel
|
||||||
|
|
||||||
|
func set_ammo(new_ammo):
|
||||||
|
ammo.text = "AMMO: " + str(new_ammo)
|
||||||
|
|
||||||
|
func set_hp(new_hp):
|
||||||
|
hp.text = "HP: " + str(new_hp)
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func show_game_over():
|
||||||
|
game_over_panel.show()
|
||||||
|
|
||||||
|
func _on_Restart_pressed():
|
||||||
|
get_tree().change_scene("res://Game.tscn")
|
||||||
|
get_tree().paused = false
|
75
GUI.tscn
Normal file
75
GUI.tscn
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://GUI.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="GUI" type="MarginContainer"]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -512.0
|
||||||
|
margin_top = -300.0
|
||||||
|
margin_right = 512.0
|
||||||
|
margin_bottom = 300.0
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="HB" type="HBoxContainer" parent="."]
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 600.0
|
||||||
|
|
||||||
|
[node name="Ammo" type="RichTextLabel" parent="HB"]
|
||||||
|
margin_right = 510.0
|
||||||
|
margin_bottom = 600.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "AMMO: 0"
|
||||||
|
|
||||||
|
[node name="HP" type="RichTextLabel" parent="HB"]
|
||||||
|
margin_left = 514.0
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 600.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "HP: 0"
|
||||||
|
|
||||||
|
[node name="PopupPanel" type="PopupPanel" parent="."]
|
||||||
|
pause_mode = 2
|
||||||
|
visible = true
|
||||||
|
margin_left = 471.0
|
||||||
|
margin_top = 277.0
|
||||||
|
margin_right = 552.0
|
||||||
|
margin_bottom = 323.0
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 4
|
||||||
|
popup_exclusive = true
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="PopupPanel"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_left = 4.0
|
||||||
|
margin_top = 4.0
|
||||||
|
margin_right = -4.0
|
||||||
|
margin_bottom = -4.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="PopupPanel/VBoxContainer"]
|
||||||
|
margin_right = 73.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
size_flags_vertical = 1
|
||||||
|
text = "Game Over"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Restart" type="Button" parent="PopupPanel/VBoxContainer"]
|
||||||
|
margin_top = 18.0
|
||||||
|
margin_right = 73.0
|
||||||
|
margin_bottom = 38.0
|
||||||
|
text = "Restart"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="PopupPanel/VBoxContainer/Restart" to="." method="_on_Restart_pressed"]
|
55
Game.gd
Normal file
55
Game.gd
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
onready var nav = $Navigation2D
|
||||||
|
onready var gui = $CanvasLayer/GUI
|
||||||
|
onready var player = $Navigation2D/TileMap/Player
|
||||||
|
onready var sound_player = $SoundPlayer
|
||||||
|
|
||||||
|
var enemies_remaining = 0
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
var nodes = get_tree().get_nodes_in_group("enemy")
|
||||||
|
enemies_remaining = len(nodes)
|
||||||
|
for node in nodes:
|
||||||
|
node.set_nav(nav)
|
||||||
|
node.connect("enemy_killed", self, "handle_enemy_killed")
|
||||||
|
node.connect("enemy_damaged", self, "handle_enemy_damaged")
|
||||||
|
var medpacks = get_tree().get_nodes_in_group("medpack")
|
||||||
|
for node in medpacks:
|
||||||
|
node.connect("medpack_taken", self, "handle_medpack_taken")
|
||||||
|
var ammo = get_tree().get_nodes_in_group("ammo")
|
||||||
|
for node in ammo:
|
||||||
|
node.connect("ammo_taken", self, "handle_ammo_taken")
|
||||||
|
gui.set_hp(player.hp)
|
||||||
|
|
||||||
|
func handle_enemy_killed():
|
||||||
|
enemies_remaining -= 1
|
||||||
|
sound_player.play_enemy_killed1()
|
||||||
|
if enemies_remaining <= 0:
|
||||||
|
get_tree().paused = true
|
||||||
|
gui.show_game_over()
|
||||||
|
|
||||||
|
func handle_enemy_damaged():
|
||||||
|
sound_player.play_enemy_hurt1()
|
||||||
|
|
||||||
|
func handle_medpack_taken():
|
||||||
|
sound_player.play_pickup_1()
|
||||||
|
|
||||||
|
func handle_ammo_taken():
|
||||||
|
sound_player.play_powerup_1()
|
||||||
|
|
||||||
|
func _on_KinematicBody2D2_ammo_changed(ammo):
|
||||||
|
gui.set_ammo(ammo)
|
||||||
|
|
||||||
|
func _on_KinematicBody2D2_hp_changed(hp):
|
||||||
|
gui.set_hp(hp)
|
||||||
|
|
||||||
|
func _on_Player_player_dead():
|
||||||
|
get_tree().paused = true
|
||||||
|
gui.show_game_over()
|
||||||
|
|
||||||
|
func _on_Player_shot_fired():
|
||||||
|
sound_player.play_shoot_1()
|
||||||
|
|
||||||
|
func _on_Player_player_hurt():
|
||||||
|
sound_player.play_player_hurt1()
|
148
Game.tscn
Normal file
148
Game.tscn
Normal file
File diff suppressed because one or more lines are too long
10
Gun.gd
Normal file
10
Gun.gd
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
export(int) var ammo = 5
|
||||||
|
signal ammo_taken
|
||||||
|
|
||||||
|
func _on_Area2D_body_entered(body):
|
||||||
|
if body.has_method("pick_up"):
|
||||||
|
body.pick_up(ammo)
|
||||||
|
emit_signal("ammo_taken")
|
||||||
|
queue_free()
|
24
Gun.tscn
Normal file
24
Gun.tscn
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Gun.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=1]
|
||||||
|
radius = 6.39507
|
||||||
|
|
||||||
|
[node name="Gun" type="Node2D" groups=[
|
||||||
|
"ammo",
|
||||||
|
]]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 48, 0, 16, 16 )
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="Pickup" type="CollisionShape2D" parent="Area2D"]
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
|
13
Medpack.gd
Normal file
13
Medpack.gd
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
export var heal_amount : int = 1
|
||||||
|
signal medpack_taken
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func _on_Pickup_body_entered(body):
|
||||||
|
if body.has_method("heal"):
|
||||||
|
body.heal(heal_amount)
|
||||||
|
emit_signal("medpack_taken")
|
||||||
|
queue_free()
|
24
Medpack.tscn
Normal file
24
Medpack.tscn
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Medpack.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 7.13723, 6.22526 )
|
||||||
|
|
||||||
|
[node name="Medpack" type="Node2D" groups=[
|
||||||
|
"medpack",
|
||||||
|
]]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Graphic" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 48, 16, 16, 16 )
|
||||||
|
|
||||||
|
[node name="Pickup" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="PickupCollider" type="CollisionShape2D" parent="Pickup"]
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Pickup" to="." method="_on_Pickup_body_entered"]
|
100
Player.gd
Normal file
100
Player.gd
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
extends KinematicBody2D
|
||||||
|
class_name Player
|
||||||
|
var Bullet = preload("res://Bullet.tscn")
|
||||||
|
|
||||||
|
signal ammo_changed(ammo)
|
||||||
|
signal hp_changed(hp)
|
||||||
|
signal player_dead
|
||||||
|
signal player_hurt
|
||||||
|
signal shot_fired
|
||||||
|
|
||||||
|
func is_player() -> bool:
|
||||||
|
return true
|
||||||
|
|
||||||
|
var input_vec = Vector2.ZERO
|
||||||
|
var last_dir = Vector2.ZERO
|
||||||
|
var ammo : int = 0
|
||||||
|
var max_hp : int = 5
|
||||||
|
var hp : int = 5
|
||||||
|
|
||||||
|
const SHOOT_COOLDOWN = 1
|
||||||
|
var shoot_cooldown_remaining : float = 0.0
|
||||||
|
|
||||||
|
onready var sprite = $AnimatedSprite
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
||||||
|
|
||||||
|
func is_type(type):
|
||||||
|
return type == "Player" or .is_type(type)
|
||||||
|
|
||||||
|
func heal(amount : int):
|
||||||
|
hp += amount
|
||||||
|
if hp > max_hp:
|
||||||
|
hp = max_hp
|
||||||
|
emit_signal("hp_changed", hp)
|
||||||
|
|
||||||
|
func take_damage(dmg : int):
|
||||||
|
hp -= dmg
|
||||||
|
if hp <= 0:
|
||||||
|
hp = 0
|
||||||
|
emit_signal("player_dead")
|
||||||
|
emit_signal("hp_changed", hp)
|
||||||
|
emit_signal("player_hurt")
|
||||||
|
|
||||||
|
func get_type():
|
||||||
|
return "Player"
|
||||||
|
|
||||||
|
func pick_up(p_ammo):
|
||||||
|
ammo += p_ammo
|
||||||
|
emit_signal("ammo_changed", ammo)
|
||||||
|
|
||||||
|
func fire():
|
||||||
|
var bullet = Bullet.instance()
|
||||||
|
bullet.global_position = self.global_position
|
||||||
|
bullet.init(last_dir)
|
||||||
|
get_parent().add_child(bullet)
|
||||||
|
ammo -= 1
|
||||||
|
emit_signal("ammo_changed", ammo)
|
||||||
|
shoot_cooldown_remaining = SHOOT_COOLDOWN
|
||||||
|
emit_signal("shot_fired")
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if !is_alive():
|
||||||
|
return
|
||||||
|
shoot_cooldown_remaining -= delta
|
||||||
|
if shoot_cooldown_remaining < 0.0:
|
||||||
|
shoot_cooldown_remaining = 0.0
|
||||||
|
input_vec = Vector2.ZERO
|
||||||
|
if Input.is_action_pressed("ui_down"):
|
||||||
|
input_vec.y = 1
|
||||||
|
if Input.is_action_pressed("ui_up"):
|
||||||
|
input_vec.y = -1
|
||||||
|
if Input.is_action_pressed("ui_right"):
|
||||||
|
input_vec.x = 1
|
||||||
|
if Input.is_action_pressed("ui_left"):
|
||||||
|
input_vec.x = -1
|
||||||
|
if input_vec != Vector2.ZERO:
|
||||||
|
last_dir = input_vec.normalized()
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("ui_accept"):
|
||||||
|
if shoot_cooldown_remaining <= 0.0 and ammo > 0:
|
||||||
|
fire()
|
||||||
|
|
||||||
|
if input_vec.x < 0:
|
||||||
|
sprite.animation = "side"
|
||||||
|
sprite.flip_h = true
|
||||||
|
elif input_vec.x > 0:
|
||||||
|
sprite.animation = "side"
|
||||||
|
sprite.flip_h = false
|
||||||
|
|
||||||
|
if input_vec.y < 0:
|
||||||
|
sprite.animation = "up"
|
||||||
|
elif input_vec.y > 0:
|
||||||
|
sprite.animation = "down"
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
move_and_slide(input_vec.normalized() * 100, Vector2.UP)
|
||||||
|
|
||||||
|
func is_alive() -> bool:
|
||||||
|
return hp > 0
|
51
Player.tscn
Normal file
51
Player.tscn
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
[gd_scene load_steps=8 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Player.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=1]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 32, 16, 16, 16 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=2]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 0, 16, 16, 16 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=3]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 16, 16, 16, 16 )
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=4]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ SubResource( 1 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "side",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 2 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "down",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 3 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "up",
|
||||||
|
"speed": 5.0
|
||||||
|
} ]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=5]
|
||||||
|
|
||||||
|
[node name="Player" type="KinematicBody2D"]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
|
frames = SubResource( 4 )
|
||||||
|
animation = "down"
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource( 5 )
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
current = true
|
||||||
|
zoom = Vector2( 0.5, 0.5 )
|
||||||
|
process_mode = 0
|
28
SoundPlayer.gd
Normal file
28
SoundPlayer.gd
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
onready var pickup_1 = $Pickup1
|
||||||
|
onready var powerup_1 = $Powerup1
|
||||||
|
onready var shoot_1 = $Shoot1
|
||||||
|
onready var enemy_hurt1 = $EnemyHurt1
|
||||||
|
onready var enemy_killed1 = $EnemyKilled1
|
||||||
|
onready var player_hurt1 = $PlayerHurt1
|
||||||
|
|
||||||
|
func play_pickup_1():
|
||||||
|
pickup_1.play()
|
||||||
|
|
||||||
|
func play_powerup_1():
|
||||||
|
powerup_1.play()
|
||||||
|
|
||||||
|
func play_shoot_1():
|
||||||
|
shoot_1.play()
|
||||||
|
|
||||||
|
func play_enemy_hurt1():
|
||||||
|
enemy_hurt1.play()
|
||||||
|
|
||||||
|
func play_enemy_killed1():
|
||||||
|
enemy_killed1.play()
|
||||||
|
|
||||||
|
func play_player_hurt1():
|
||||||
|
player_hurt1.play()
|
||||||
|
|
36
SoundPlayer.tscn
Normal file
36
SoundPlayer.tscn
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://pickup1.wav" type="AudioStream" id=1]
|
||||||
|
[ext_resource path="res://SoundPlayer.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://powerup.wav" type="AudioStream" id=3]
|
||||||
|
[ext_resource path="res://shoot.wav" type="AudioStream" id=4]
|
||||||
|
[ext_resource path="res://enemy_hurt.wav" type="AudioStream" id=5]
|
||||||
|
[ext_resource path="res://enemy_killed.wav" type="AudioStream" id=6]
|
||||||
|
[ext_resource path="res://player_hurt.wav" type="AudioStream" id=7]
|
||||||
|
[ext_resource path="res://Cabin Fever Theme.mp3" type="AudioStream" id=8]
|
||||||
|
|
||||||
|
[node name="SoundPlayer" type="Node2D"]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Pickup1" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Powerup1" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 3 )
|
||||||
|
|
||||||
|
[node name="Shoot1" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="EnemyHurt1" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="EnemyKilled1" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="PlayerHurt1" type="AudioStreamPlayer" parent="."]
|
||||||
|
stream = ExtResource( 7 )
|
||||||
|
|
||||||
|
[node name="Music" type="AudioStreamPlayer" parent="."]
|
||||||
|
pause_mode = 2
|
||||||
|
stream = ExtResource( 8 )
|
||||||
|
autoplay = true
|
88
Spider.gd
Normal file
88
Spider.gd
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
extends KinematicBody2D
|
||||||
|
|
||||||
|
signal enemy_killed
|
||||||
|
signal enemy_damaged
|
||||||
|
|
||||||
|
var navi : Navigation2D
|
||||||
|
onready var sprite : AnimatedSprite = $AnimatedSprite
|
||||||
|
onready var aggro_area : Area2D = $AggroArea
|
||||||
|
onready var look : RayCast2D = $Look
|
||||||
|
onready var collision_shape : CollisionShape2D = $CollisionShape2D
|
||||||
|
onready var aggro_collision : CollisionShape2D = $AggroArea/AggroRadius
|
||||||
|
onready var attack_area : Area2D = $AttackArea
|
||||||
|
onready var stun_timer : Timer = $StunTimer
|
||||||
|
|
||||||
|
var target : Player
|
||||||
|
var input_vec : Vector2 = Vector2.ZERO
|
||||||
|
var player_seen : bool = false
|
||||||
|
export var hp : int = 1
|
||||||
|
export var attack_speed : float = 2.0
|
||||||
|
var since_attack : float = 0
|
||||||
|
var stunned : bool = false
|
||||||
|
|
||||||
|
func take_damage(damage : int):
|
||||||
|
hp -= damage
|
||||||
|
stun_timer.start()
|
||||||
|
stunned = true
|
||||||
|
if hp <= 0:
|
||||||
|
emit_signal("enemy_killed")
|
||||||
|
queue_free()
|
||||||
|
return
|
||||||
|
emit_signal("enemy_damaged")
|
||||||
|
player_seen = true
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
look.add_exception(collision_shape)
|
||||||
|
look.add_exception(aggro_collision)
|
||||||
|
|
||||||
|
func set_nav(nav : Navigation2D):
|
||||||
|
navi = nav
|
||||||
|
|
||||||
|
func search_player():
|
||||||
|
if target != null:
|
||||||
|
var enemy_to_player = target.global_position - self.global_position
|
||||||
|
look.cast_to = enemy_to_player
|
||||||
|
if look.is_colliding():
|
||||||
|
var collider = look.get_collider()
|
||||||
|
if collider == target:
|
||||||
|
player_seen = true
|
||||||
|
|
||||||
|
func try_attack() -> bool:
|
||||||
|
if target == null:
|
||||||
|
return false
|
||||||
|
if !target.is_alive():
|
||||||
|
return true
|
||||||
|
if attack_area.overlaps_body(target):
|
||||||
|
if target.has_method("take_damage") and since_attack <= 0:
|
||||||
|
target.take_damage(1)
|
||||||
|
since_attack = attack_speed
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
since_attack -= delta
|
||||||
|
if since_attack < 0:
|
||||||
|
since_attack = 0
|
||||||
|
if target == null:
|
||||||
|
return
|
||||||
|
elif navi != null and player_seen:
|
||||||
|
var path : PoolVector2Array = navi.get_simple_path(self.global_position, target.global_position)
|
||||||
|
if path.size() >= 1:
|
||||||
|
input_vec = (path[1] - position).normalized()
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
if !player_seen:
|
||||||
|
search_player()
|
||||||
|
elif try_attack():
|
||||||
|
return
|
||||||
|
var speed = 90
|
||||||
|
if stunned:
|
||||||
|
speed = 60
|
||||||
|
move_and_slide(input_vec.normalized() * speed, Vector2.UP)
|
||||||
|
|
||||||
|
func _on_AggroArea_body_entered(body):
|
||||||
|
if body.has_method("is_player") and body.is_player():
|
||||||
|
target = body
|
||||||
|
|
||||||
|
func _on_StunTimer_timeout():
|
||||||
|
stunned = false
|
46
Spider.tscn
Normal file
46
Spider.tscn
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Spider.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=1]
|
||||||
|
radius = 7.80859
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=2]
|
||||||
|
radius = 184.082
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=3]
|
||||||
|
radius = 20.4363
|
||||||
|
|
||||||
|
[node name="Spider" type="KinematicBody2D" groups=[
|
||||||
|
"enemy",
|
||||||
|
]]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Graphics" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 1 )
|
||||||
|
region_enabled = true
|
||||||
|
region_rect = Rect2( 0, 48, 16, 16 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="StunTimer" type="Timer" parent="."]
|
||||||
|
wait_time = 0.5
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="AggroArea" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="AggroRadius" type="CollisionShape2D" parent="AggroArea"]
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="Look" type="RayCast2D" parent="."]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[node name="AttackArea" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="AttackRadius" type="CollisionShape2D" parent="AttackArea"]
|
||||||
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
|
[connection signal="timeout" from="StunTimer" to="." method="_on_StunTimer_timeout"]
|
||||||
|
[connection signal="body_entered" from="AggroArea" to="." method="_on_AggroArea_body_entered"]
|
BIN
Sprites/bg.aseprite
Normal file
BIN
Sprites/bg.aseprite
Normal file
Binary file not shown.
BIN
Sprites/grass.aseprite
Normal file
BIN
Sprites/grass.aseprite
Normal file
Binary file not shown.
BIN
Sprites/ground.aseprite
Normal file
BIN
Sprites/ground.aseprite
Normal file
Binary file not shown.
BIN
Sprites/man.aseprite
Normal file
BIN
Sprites/man.aseprite
Normal file
Binary file not shown.
BIN
Sprites/sprite-sheet.aseprite
Normal file
BIN
Sprites/sprite-sheet.aseprite
Normal file
Binary file not shown.
BIN
Sprites/sprite-sheet.png
Normal file
BIN
Sprites/sprite-sheet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
34
Sprites/sprite-sheet.png.import
Normal file
34
Sprites/sprite-sheet.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/sprite-sheet.png-74d03668f081bf22426362b62be78e72.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/sprite-sheet.png"
|
||||||
|
dest_files=[ "res://.import/sprite-sheet.png-74d03668f081bf22426362b62be78e72.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=3
|
||||||
|
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=false
|
||||||
|
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
|
BIN
Sprites/zombo.aseprite
Normal file
BIN
Sprites/zombo.aseprite
Normal file
Binary file not shown.
106
Zombo.gd
Normal file
106
Zombo.gd
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
extends KinematicBody2D
|
||||||
|
|
||||||
|
signal enemy_killed
|
||||||
|
signal enemy_damaged
|
||||||
|
|
||||||
|
var navi : Navigation2D
|
||||||
|
onready var sprite : AnimatedSprite = $AnimatedSprite
|
||||||
|
onready var aggro_area : Area2D = $AggroArea
|
||||||
|
onready var look : RayCast2D = $Look
|
||||||
|
onready var collision_shape : CollisionShape2D = $CollisionShape2D
|
||||||
|
onready var aggro_collision : CollisionShape2D = $AggroArea/AggroRadius
|
||||||
|
onready var attack_area : Area2D = $AttackArea
|
||||||
|
onready var stun_timer : Timer = $StunTimer
|
||||||
|
|
||||||
|
var target : Player
|
||||||
|
var input_vec : Vector2 = Vector2.ZERO
|
||||||
|
var player_seen : bool = false
|
||||||
|
export var hp : int = 3
|
||||||
|
export var attack_speed : float = 3.0
|
||||||
|
var since_attack : float = 0
|
||||||
|
var stunned : bool = false
|
||||||
|
|
||||||
|
func take_damage(damage : int):
|
||||||
|
hp -= damage
|
||||||
|
stun_timer.start()
|
||||||
|
stunned = true
|
||||||
|
if hp <= 0:
|
||||||
|
emit_signal("enemy_killed")
|
||||||
|
queue_free()
|
||||||
|
return
|
||||||
|
emit_signal("enemy_damaged")
|
||||||
|
player_seen = true
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
look.add_exception(collision_shape)
|
||||||
|
look.add_exception(aggro_collision)
|
||||||
|
|
||||||
|
func set_nav(nav : Navigation2D):
|
||||||
|
navi = nav
|
||||||
|
|
||||||
|
func search_player():
|
||||||
|
if target != null:
|
||||||
|
var enemy_to_player = target.global_position - self.global_position
|
||||||
|
look.cast_to = enemy_to_player
|
||||||
|
if look.is_colliding():
|
||||||
|
var collider = look.get_collider()
|
||||||
|
if collider == target:
|
||||||
|
player_seen = true
|
||||||
|
|
||||||
|
func try_attack() -> bool:
|
||||||
|
if target == null:
|
||||||
|
return false
|
||||||
|
if !target.is_alive():
|
||||||
|
return true
|
||||||
|
if attack_area.overlaps_body(target):
|
||||||
|
if target.has_method("take_damage") and since_attack <= 0:
|
||||||
|
target.take_damage(1)
|
||||||
|
since_attack = attack_speed
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
since_attack -= delta
|
||||||
|
if since_attack < 0:
|
||||||
|
since_attack = 0
|
||||||
|
if target == null:
|
||||||
|
return
|
||||||
|
elif navi != null and player_seen:
|
||||||
|
var path : PoolVector2Array = navi.get_simple_path(self.global_position, target.global_position)
|
||||||
|
if path.size() >= 1:
|
||||||
|
input_vec = (path[1] - position).normalized()
|
||||||
|
|
||||||
|
var abs_y = abs(input_vec.y)
|
||||||
|
var abs_x = abs(input_vec.x)
|
||||||
|
|
||||||
|
if input_vec.x < 0:
|
||||||
|
sprite.animation = "side"
|
||||||
|
sprite.flip_h = true
|
||||||
|
elif input_vec.x > 0:
|
||||||
|
sprite.animation = "side"
|
||||||
|
sprite.flip_h = false
|
||||||
|
|
||||||
|
if input_vec.y < 0:
|
||||||
|
sprite.animation = "up"
|
||||||
|
elif input_vec.y > 0:
|
||||||
|
sprite.animation = "down"
|
||||||
|
|
||||||
|
if abs_y < abs_x:
|
||||||
|
sprite.animation = "side"
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
if !player_seen:
|
||||||
|
search_player()
|
||||||
|
elif try_attack():
|
||||||
|
return
|
||||||
|
var speed = 80
|
||||||
|
if stunned:
|
||||||
|
speed = 40
|
||||||
|
move_and_slide(input_vec.normalized() * speed, Vector2.UP)
|
||||||
|
|
||||||
|
func _on_AggroArea_body_entered(body):
|
||||||
|
if body.has_method("is_player") and body.is_player():
|
||||||
|
target = body
|
||||||
|
|
||||||
|
func _on_StunTimer_timeout():
|
||||||
|
stunned = false
|
75
Zombo.tscn
Normal file
75
Zombo.tscn
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
[gd_scene load_steps=10 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Sprites/sprite-sheet.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://Zombo.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=1]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 32, 32, 16, 16 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=2]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 0, 32, 16, 16 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=3]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 16, 32, 16, 16 )
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=4]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ SubResource( 1 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "side",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 2 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "down",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ SubResource( 3 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "up",
|
||||||
|
"speed": 5.0
|
||||||
|
} ]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=5]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=6]
|
||||||
|
radius = 227.001
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=7]
|
||||||
|
radius = 16.2195
|
||||||
|
|
||||||
|
[node name="Zombo" type="KinematicBody2D" groups=[
|
||||||
|
"enemy",
|
||||||
|
]]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
|
frames = SubResource( 4 )
|
||||||
|
animation = "side"
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource( 5 )
|
||||||
|
|
||||||
|
[node name="AggroArea" type="Area2D" parent="."]
|
||||||
|
monitorable = false
|
||||||
|
|
||||||
|
[node name="AggroRadius" type="CollisionShape2D" parent="AggroArea"]
|
||||||
|
shape = SubResource( 6 )
|
||||||
|
|
||||||
|
[node name="Look" type="RayCast2D" parent="."]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[node name="AttackArea" type="Area2D" parent="."]
|
||||||
|
|
||||||
|
[node name="AttackRadius" type="CollisionShape2D" parent="AttackArea"]
|
||||||
|
shape = SubResource( 7 )
|
||||||
|
|
||||||
|
[node name="StunTimer" type="Timer" parent="."]
|
||||||
|
wait_time = 0.5
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="AggroArea" to="." method="_on_AggroArea_body_entered"]
|
||||||
|
[connection signal="timeout" from="StunTimer" to="." method="_on_StunTimer_timeout"]
|
7
default_env.tres
Normal file
7
default_env.tres
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[gd_resource type="Environment" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSky" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
background_mode = 2
|
||||||
|
background_sky = SubResource( 1 )
|
BIN
enemy_hurt.wav
Normal file
BIN
enemy_hurt.wav
Normal file
Binary file not shown.
21
enemy_hurt.wav.import
Normal file
21
enemy_hurt.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/enemy_hurt.wav-e6cb129821f2f4b9caaba556a042533b.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://enemy_hurt.wav"
|
||||||
|
dest_files=[ "res://.import/enemy_hurt.wav-e6cb129821f2f4b9caaba556a042533b.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
BIN
enemy_killed.wav
Normal file
BIN
enemy_killed.wav
Normal file
Binary file not shown.
21
enemy_killed.wav.import
Normal file
21
enemy_killed.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/enemy_killed.wav-4897dcfb47d026c83688979a76088217.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://enemy_killed.wav"
|
||||||
|
dest_files=[ "res://.import/enemy_killed.wav-4897dcfb47d026c83688979a76088217.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
24
export_presets.cfg
Normal file
24
export_presets.cfg
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="HTML5"
|
||||||
|
platform="HTML5"
|
||||||
|
runnable=true
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="Build/CabinFever.html"
|
||||||
|
script_export_mode=1
|
||||||
|
script_encryption_key=""
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
variant/export_type=0
|
||||||
|
vram_texture_compression/for_desktop=true
|
||||||
|
vram_texture_compression/for_mobile=false
|
||||||
|
html/custom_html_shell=""
|
||||||
|
html/head_include=""
|
||||||
|
html/canvas_resize_policy=2
|
||||||
|
html/experimental_virtual_keyboard=false
|
BIN
icon.png
Normal file
BIN
icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
34
icon.png.import
Normal file
34
icon.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.png"
|
||||||
|
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=true
|
||||||
|
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
|
BIN
pickup1.wav
Normal file
BIN
pickup1.wav
Normal file
Binary file not shown.
21
pickup1.wav.import
Normal file
21
pickup1.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/pickup1.wav-400a06205321eb462a740df1de39b4bb.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://pickup1.wav"
|
||||||
|
dest_files=[ "res://.import/pickup1.wav-400a06205321eb462a740df1de39b4bb.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
BIN
player_hurt.wav
Normal file
BIN
player_hurt.wav
Normal file
Binary file not shown.
21
player_hurt.wav.import
Normal file
21
player_hurt.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/player_hurt.wav-07c1b47cfa6491d919d933db4cd04e72.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://player_hurt.wav"
|
||||||
|
dest_files=[ "res://.import/player_hurt.wav-07c1b47cfa6491d919d933db4cd04e72.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
BIN
powerup.wav
Normal file
BIN
powerup.wav
Normal file
Binary file not shown.
21
powerup.wav.import
Normal file
21
powerup.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/powerup.wav-e49d4bc73c8a8a65007b0b997e91413b.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://powerup.wav"
|
||||||
|
dest_files=[ "res://.import/powerup.wav-e49d4bc73c8a8a65007b0b997e91413b.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
38
project.godot
Normal file
38
project.godot
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=4
|
||||||
|
|
||||||
|
_global_script_classes=[ {
|
||||||
|
"base": "KinematicBody2D",
|
||||||
|
"class": "Player",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://Player.gd"
|
||||||
|
} ]
|
||||||
|
_global_script_class_icons={
|
||||||
|
"Player": ""
|
||||||
|
}
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="CabinFever"
|
||||||
|
run/main_scene="res://Game.tscn"
|
||||||
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/resizable=false
|
||||||
|
|
||||||
|
[physics]
|
||||||
|
|
||||||
|
common/enable_pause_aware_picking=true
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
2d/snapping/use_gpu_pixel_snap=true
|
||||||
|
environment/default_environment="res://default_env.tres"
|
BIN
shoot.wav
Normal file
BIN
shoot.wav
Normal file
Binary file not shown.
21
shoot.wav.import
Normal file
21
shoot.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/shoot.wav-82b80f4af7c1d6c25a1e5afade00734c.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://shoot.wav"
|
||||||
|
dest_files=[ "res://.import/shoot.wav-82b80f4af7c1d6c25a1e5afade00734c.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
Loading…
Add table
Add a link
Reference in a new issue