Compare commits
No commits in common. "c23ad7a0cb69b491edae1e50e6709516b0e75e41" and "37b72d27f5f681c25383a4a80686cf69cef07ef0" have entirely different histories.
c23ad7a0cb
...
37b72d27f5
|
@ -20,7 +20,7 @@ compress/hdr_mode=0
|
|||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
|
@ -31,5 +31,5 @@ process/invert_color=false
|
|||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
|
|
@ -8,16 +8,6 @@
|
|||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ {
|
||||
"base": "EditorVCSInterface",
|
||||
"class": "GitAPI",
|
||||
"language": "NativeScript",
|
||||
"path": "res://addons/godot-git-plugin/git_api.gdns"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
"GitAPI": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="LD54"
|
||||
|
@ -48,7 +38,7 @@ version_control_plugin_name="GitAPI"
|
|||
|
||||
[gdnative]
|
||||
|
||||
singletons=[ "res://addons/godot-git-plugin/git_api.gdnlib" ]
|
||||
singletons=[ ]
|
||||
|
||||
[global]
|
||||
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
extends Node
|
||||
|
||||
var GAME_SCENE = preload("res://src/scenes/game/Game.tscn")
|
||||
|
||||
var playing = true
|
||||
var health = 2
|
||||
|
||||
func add_health(amount):
|
||||
health = clamp(health + amount, 0, 3)
|
||||
get_tree().get_root().get_node("Game/UI/Health/HealthSprite").frame = health
|
||||
if health == 0:
|
||||
pass # TODO endgame
|
||||
var game_scene = preload("res://src/scenes/game/Game.tscn")
|
||||
|
|
|
@ -7,6 +7,6 @@ func get_input():
|
|||
var input_direction = Input.get_vector("left", "right", "up", "down")
|
||||
velocity = input_direction * speed
|
||||
|
||||
func _physics_process(_delta):
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
velocity = move_and_slide(velocity)
|
||||
move_and_slide(velocity)
|
||||
|
|
|
@ -1,37 +1,30 @@
|
|||
[gd_scene load_steps=16 format=2]
|
||||
<<<<<<< HEAD
|
||||
[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/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://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/scenes/game/sprites/health/3.png" type="Texture" id=6]
|
||||
[ext_resource path="res://src/scenes/game/sprites/health/1.png" type="Texture" id=7]
|
||||
[ext_resource path="res://src/scenes/game/sprites/health/2.png" type="Texture" id=8]
|
||||
[ext_resource path="res://src/scenes/game/sprites/health/0.png" type="Texture" id=9]
|
||||
[ext_resource path="res://icon.png" type="Texture" id=10]
|
||||
[ext_resource path="res://src/scenes/game/game.gd" type="Script" id=11]
|
||||
<<<<<<< HEAD
|
||||
[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]
|
||||
extents = Vector2( 10, 60 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
extents = Vector2( 140, 10.125 )
|
||||
extents = Vector2( 140, 10.25 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 8
|
||||
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"]
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="View" type="Node2D" parent="."]
|
||||
|
||||
|
@ -62,7 +55,7 @@ position = Vector2( 160, 10.25 )
|
|||
shape = SubResource( 3 )
|
||||
|
||||
[node name="CollisionShape2D4" type="CollisionShape2D" parent="View/Background/Houses"]
|
||||
position = Vector2( 160, 109.875 )
|
||||
position = Vector2( 160, 110 )
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="Player" parent="View" instance=ExtResource( 5 )]
|
||||
|
@ -72,6 +65,13 @@ position = Vector2( 46, 42 )
|
|||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="UIBackground" type="TextureRect" parent="UI"]
|
||||
margin_top = 120.0
|
||||
margin_right = 320.0
|
||||
margin_bottom = 180.0
|
||||
texture = ExtResource( 6 )
|
||||
expand = true
|
||||
|
||||
[node name="SpellHolder" type="Control" parent="UI"]
|
||||
margin_left = 120.0
|
||||
margin_top = 145.0
|
||||
|
@ -86,19 +86,3 @@ margin_right = 79.0
|
|||
margin_bottom = 7.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "spell modifiers"
|
||||
|
||||
[node name="Health" type="Control" parent="UI"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="HealthSprite" type="AnimatedSprite" parent="UI/Health"]
|
||||
position = Vector2( 70, 145 )
|
||||
frames = SubResource( 4 )
|
||||
frame = 2
|
||||
centered = false
|
||||
|
||||
[node name="PlayerIcon" type="Sprite" parent="UI"]
|
||||
position = Vector2( 20, 134 )
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
texture = ExtResource( 10 )
|
||||
centered = false
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
extends Node
|
||||
|
||||
func _ready():
|
||||
Global.add_health(1)
|
|
@ -1,7 +1,7 @@
|
|||
extends Node
|
||||
|
||||
func game_start():
|
||||
get_tree().change_scene_to(Global.GAME_SCENE)
|
||||
get_tree().change_scene_to(Global.game_scene)
|
||||
|
||||
func game_exit():
|
||||
get_tree().quit(0)
|
||||
|
|
Loading…
Reference in New Issue