stupid revert
parent
447b18afdf
commit
37b72d27f5
|
@ -1,12 +1,3 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
var GAME_SCENE = preload("res://src/scenes/game/Game.tscn")
|
var game_scene = preload("res://src/scenes/game/Game.tscn")
|
||||||
|
|
||||||
var playing = true
|
|
||||||
var health = 0
|
|
||||||
|
|
||||||
func add_health(amount):
|
|
||||||
health = clamp(health + amount, 0, 3)
|
|
||||||
emit_signal("health_update")
|
|
||||||
if health == 0:
|
|
||||||
pass # TODO endgame
|
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/models/player/sprite.png" type="Texture" id=1]
|
[ext_resource path="res://src/models/player/sprite.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/models/player/player.gd" type="Script" id=2]
|
[ext_resource path="res://src/models/player/player.gd" type="Script" id=2]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 4.5, 6 )
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=2]
|
|
||||||
extents = Vector2( 7, 11 )
|
extents = Vector2( 7, 11 )
|
||||||
|
|
||||||
[node name="Player" type="KinematicBody2D"]
|
[node name="Player" type="KinematicBody2D"]
|
||||||
|
@ -16,12 +13,6 @@ script = ExtResource( 2 )
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
[node name="WallCollider" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2( 12.5, 17 )
|
|
||||||
shape = SubResource( 1 )
|
|
||||||
|
|
||||||
[node name="EnemyCollider" type="Area2D" parent="."]
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyCollider"]
|
|
||||||
position = Vector2( 12, 12 )
|
position = Vector2( 12, 12 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 1 )
|
||||||
|
|
|
@ -7,6 +7,6 @@ func get_input():
|
||||||
var input_direction = Input.get_vector("left", "right", "up", "down")
|
var input_direction = Input.get_vector("left", "right", "up", "down")
|
||||||
velocity = input_direction * speed
|
velocity = input_direction * speed
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(delta):
|
||||||
get_input()
|
get_input()
|
||||||
velocity = move_and_slide(velocity)
|
move_and_slide(velocity)
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
|
<<<<<<< HEAD
|
||||||
[gd_scene load_steps=10 format=2]
|
[gd_scene load_steps=10 format=2]
|
||||||
|
=======
|
||||||
|
[gd_scene load_steps=9 format=2]
|
||||||
|
>>>>>>> parent of f3dd6ee (Change Player Hitbox)
|
||||||
|
|
||||||
[ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1]
|
[ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2]
|
[ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2]
|
||||||
[ext_resource path="res://src/scenes/game/spell_holder.gd" type="Script" id=3]
|
[ext_resource path="res://src/scenes/game/spell_holder.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=4]
|
[ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=4]
|
||||||
[ext_resource path="res://src/models/player/Player.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://src/models/player/Player.tscn" type="PackedScene" id=5]
|
||||||
|
<<<<<<< HEAD
|
||||||
[ext_resource path="res://src/scenes/game/sprites/ui_background.png" type="Texture" id=6]
|
[ext_resource path="res://src/scenes/game/sprites/ui_background.png" type="Texture" id=6]
|
||||||
|
=======
|
||||||
|
>>>>>>> parent of f3dd6ee (Change Player Hitbox)
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=2]
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
extents = Vector2( 10, 60 )
|
extents = Vector2( 10, 60 )
|
||||||
|
@ -17,14 +24,6 @@ extents = Vector2( 140, 10.25 )
|
||||||
size = 8
|
size = 8
|
||||||
font_data = ExtResource( 4 )
|
font_data = ExtResource( 4 )
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id=4]
|
|
||||||
animations = [ {
|
|
||||||
"frames": [ ExtResource( 9 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 6 ) ],
|
|
||||||
"loop": true,
|
|
||||||
"name": "default",
|
|
||||||
"speed": 5.0
|
|
||||||
} ]
|
|
||||||
|
|
||||||
[node name="Game" type="Node"]
|
[node name="Game" type="Node"]
|
||||||
|
|
||||||
[node name="View" type="Node2D" parent="."]
|
[node name="View" type="Node2D" parent="."]
|
||||||
|
@ -87,12 +86,3 @@ margin_right = 79.0
|
||||||
margin_bottom = 7.0
|
margin_bottom = 7.0
|
||||||
custom_fonts/font = SubResource( 1 )
|
custom_fonts/font = SubResource( 1 )
|
||||||
text = "spell modifiers"
|
text = "spell modifiers"
|
||||||
|
|
||||||
[node name="Health" type="Control" parent="UI"]
|
|
||||||
margin_right = 40.0
|
|
||||||
margin_bottom = 40.0
|
|
||||||
|
|
||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="UI/Health"]
|
|
||||||
position = Vector2( 70, 145 )
|
|
||||||
frames = SubResource( 4 )
|
|
||||||
centered = false
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/0.png-02c85cf70c99d3d8411f3ce28c6dff74.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/scenes/game/sprites/health/0.png"
|
|
||||||
dest_files=[ "res://.import/0.png-02c85cf70c99d3d8411f3ce28c6dff74.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
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/1.png-047cc618dec88d280c194537c3a6f7ff.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/scenes/game/sprites/health/1.png"
|
|
||||||
dest_files=[ "res://.import/1.png-047cc618dec88d280c194537c3a6f7ff.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=false
|
|
||||||
svg/scale=1.0
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/2.png-7a1d2df16559ebcf67438a13aec9cf5d.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/scenes/game/sprites/health/2.png"
|
|
||||||
dest_files=[ "res://.import/2.png-7a1d2df16559ebcf67438a13aec9cf5d.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=false
|
|
||||||
svg/scale=1.0
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
|
@ -1,35 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/3.png-cf9102fa2f0f8d9abb6f2ada3be84162.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/scenes/game/sprites/health/3.png"
|
|
||||||
dest_files=[ "res://.import/3.png-cf9102fa2f0f8d9abb6f2ada3be84162.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=false
|
|
||||||
svg/scale=1.0
|
|
|
@ -1,7 +1,7 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
func game_start():
|
func game_start():
|
||||||
get_tree().change_scene_to(Global.GAME_SCENE)
|
get_tree().change_scene_to(Global.game_scene)
|
||||||
|
|
||||||
func game_exit():
|
func game_exit():
|
||||||
get_tree().quit(0)
|
get_tree().quit(0)
|
||||||
|
|
Loading…
Reference in New Issue