parent
f870ed8003
commit
d421821fbe
@ -1,7 +1,18 @@
|
||||
extends Sprite2D
|
||||
|
||||
@onready var ATB = $battle_menu/ATB
|
||||
|
||||
func _ready():
|
||||
var menu = $battle_menu
|
||||
menu.add_action($Combatant/Actions/attack)
|
||||
menu.add_action($Combatant/Actions/spin_attack)
|
||||
menu.add_action($Combatant/Actions/attack).action_selected.connect(do_action)
|
||||
menu.add_action($Combatant/Actions/spin_attack).action_selected.connect(do_action)
|
||||
|
||||
|
||||
func _process(delta):
|
||||
var combatant = $Combatant
|
||||
combatant.tick_atb(delta)
|
||||
ATB.value = combatant.ATBCurrent
|
||||
|
||||
|
||||
func do_action(action):
|
||||
print("Player selected: %s" % action.ActionName)
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://b2iq5inxeoe82"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dedauf4ntkthu" path="res://icon.svg" id="1_d15px"]
|
||||
[ext_resource type="Script" path="res://Test Scenes/Player.gd" id="2_8b3bs"]
|
||||
[ext_resource type="PackedScene" uid="uid://cl5d768roh8ir" path="res://Systems/UI/Menu System/battle_menu.tscn" id="3_ubnwv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dqf1p1mfki3vc" path="res://assets/art/ui/bar_under.png" id="4_afpwe"]
|
||||
[ext_resource type="PackedScene" uid="uid://ch1sc85jxy1r7" path="res://Systems/Combat/Combatant.tscn" id="4_w3vb5"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnp5t7o26kb0c" path="res://assets/art/ui/bar_over.png" id="5_5mhew"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbbyup8pp6uam" path="res://Test Scenes/Test Player Actions/attack.tscn" id="5_17k7n"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmot4y61f1r8f" path="res://Test Scenes/Test Player Actions/spin_attack.tscn" id="6_yaobw"]
|
||||
[ext_resource type="Script" path="res://Systems/Combat/Scripts/combat_stats.gd" id="7_ynhjd"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_28c5l"]
|
||||
script = ExtResource("7_ynhjd")
|
||||
MaxHP = 10
|
||||
MaxPhysicalStamina = 10
|
||||
MaxMentalStamina = 10
|
||||
Strength = 1
|
||||
Wisdom = 1
|
||||
Constitution = 1
|
||||
Willpower = 1
|
||||
Speed = 1
|
||||
Focus = 1
|
||||
Accuracy = 1
|
||||
Agility = 1
|
||||
|
||||
[node name="Player" type="Sprite2D"]
|
||||
position = Vector2(447, 283)
|
||||
texture = ExtResource("1_d15px")
|
||||
script = ExtResource("2_8b3bs")
|
||||
|
||||
[node name="battle_menu" parent="." instance=ExtResource("3_ubnwv")]
|
||||
offset_left = -64.0
|
||||
offset_top = 184.0
|
||||
offset_right = -64.0
|
||||
offset_bottom = 161.0
|
||||
|
||||
[node name="ATB" type="TextureProgressBar" parent="battle_menu"]
|
||||
layout_mode = 0
|
||||
offset_left = -36.0
|
||||
offset_top = -68.0
|
||||
offset_right = 234.0
|
||||
offset_bottom = -18.0
|
||||
scale = Vector2(0.762202, 0.60304)
|
||||
value = 50.0
|
||||
texture_under = ExtResource("4_afpwe")
|
||||
texture_progress = ExtResource("5_5mhew")
|
||||
texture_progress_offset = Vector2(16, 8)
|
||||
|
||||
[node name="Combatant" parent="." node_paths=PackedStringArray("Actions") instance=ExtResource("4_w3vb5")]
|
||||
Stats = SubResource("Resource_28c5l")
|
||||
Actions = [null, null]
|
||||
|
||||
[node name="Actions" type="Node" parent="Combatant"]
|
||||
|
||||
[node name="attack" parent="Combatant/Actions" instance=ExtResource("5_17k7n")]
|
||||
ActionName = "Attack"
|
||||
ActionText = "Attack"
|
||||
|
||||
[node name="spin_attack" parent="Combatant/Actions" instance=ExtResource("6_yaobw")]
|
||||
ActionName = "Spin Attack"
|
||||
ActionText = "Spin Attack"
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bnp5t7o26kb0c"
|
||||
path="res://.godot/imported/bar_over.png-55a6bae0151fad781ffcae0da3dc8d8b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/art/ui/bar_over.png"
|
||||
dest_files=["res://.godot/imported/bar_over.png-55a6bae0151fad781ffcae0da3dc8d8b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dqf1p1mfki3vc"
|
||||
path="res://.godot/imported/bar_under.png-f50ef5b32422e97a71938bac527202bf.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/art/ui/bar_under.png"
|
||||
dest_files=["res://.godot/imported/bar_under.png-f50ef5b32422e97a71938bac527202bf.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dusv2g2bfou5l"
|
||||
path="res://.godot/imported/bars.png-44ddffd67a1ebda120adc0b0e3911832.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/art/ui/bars.png"
|
||||
dest_files=["res://.godot/imported/bars.png-44ddffd67a1ebda120adc0b0e3911832.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Loading…
Reference in New Issue