Compare commits
No commits in common. '566c563446428916d7d159776ce310cd1c0bfec3' and 'f870ed80030881a901d64554e209be7c256b19a4' have entirely different histories.
566c563446
...
f870ed8003
@ -1,19 +0,0 @@
|
||||
extends Action
|
||||
class_name Attack
|
||||
|
||||
func _ready():
|
||||
ActionName = "Attack"
|
||||
|
||||
var timer
|
||||
func execute():
|
||||
timer = Timer.new()
|
||||
timer.timeout.connect(done)
|
||||
timer.wait_time = 1
|
||||
add_child(timer)
|
||||
timer.start()
|
||||
print("Executing Attack!")
|
||||
|
||||
func done():
|
||||
timer.queue_free()
|
||||
action_finished.emit()
|
||||
|
||||
@ -1,40 +1,7 @@
|
||||
extends Sprite2D
|
||||
|
||||
@export var SpecialActions: Array[Action] = []
|
||||
|
||||
@onready var ATB = $battle_menu/ATB
|
||||
@onready var ActionState = $battle_menu/ActionPanel/ActionState
|
||||
@onready var Actions = $Combatant/Actions
|
||||
var NextAction
|
||||
var ActionReady = false
|
||||
|
||||
|
||||
func _process(delta):
|
||||
|
||||
var combatant = $Combatant
|
||||
if ActionReady and ATB.value == 100:
|
||||
NextAction.execute()
|
||||
ActionState.text = "Action Executing: %s" % NextAction.ActionName
|
||||
combatant.ATBCurrent = 0
|
||||
ATB.value = 0
|
||||
ActionReady = false
|
||||
return
|
||||
|
||||
|
||||
combatant.tick_atb(delta)
|
||||
ATB.value = combatant.ATBCurrent
|
||||
|
||||
|
||||
func do_action(a):
|
||||
|
||||
var action = Actions.get_node(a)
|
||||
if !action:
|
||||
push_error("Unknown battle action: %s" % a)
|
||||
return
|
||||
|
||||
ActionState.text = "Action Queued: %s" % action.ActionName
|
||||
NextAction = action
|
||||
ActionReady = true
|
||||
|
||||
func action_done():
|
||||
ActionState.text = ""
|
||||
func _ready():
|
||||
var menu = $battle_menu
|
||||
menu.add_action($Combatant/Actions/attack)
|
||||
menu.add_action($Combatant/Actions/spin_attack)
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
extends Action
|
||||
|
||||
|
||||
|
||||
func execute():
|
||||
print("Test Player Attacking!")
|
||||
@ -1,14 +1,4 @@
|
||||
extends Action
|
||||
|
||||
var timer
|
||||
func execute():
|
||||
timer = Timer.new()
|
||||
timer.timeout.connect(done)
|
||||
timer.wait_time = 1
|
||||
add_child(timer)
|
||||
timer.start()
|
||||
print("Executing Spin Attack!")
|
||||
|
||||
func done():
|
||||
timer.queue_free()
|
||||
action_finished.emit()
|
||||
print("Test Player uses Spin Attack!")
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bbbyup8pp6uam"]
|
||||
|
||||
[ext_resource type="Script" path="res://Systems/Combat/Actions/Standard Actions/attack.gd" id="1_nmi0m"]
|
||||
[ext_resource type="Script" path="res://Test Scenes/Test Player Actions/Scripts/attack.gd" id="1_nmi0m"]
|
||||
|
||||
[node name="attack" type="Node"]
|
||||
script = ExtResource("1_nmi0m")
|
||||
@ -1,87 +0,0 @@
|
||||
[gd_scene load_steps=10 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://Systems/Combat/Actions/Standard Actions/attack.tscn" id="5_17k7n"]
|
||||
[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(553, 219)
|
||||
texture = ExtResource("1_d15px")
|
||||
script = ExtResource("2_8b3bs")
|
||||
|
||||
[node name="battle_menu" parent="." instance=ExtResource("3_ubnwv")]
|
||||
offset_left = -49.0
|
||||
offset_top = 126.0
|
||||
offset_right = -49.0
|
||||
offset_bottom = 103.0
|
||||
|
||||
[node name="ATB" type="TextureProgressBar" parent="battle_menu"]
|
||||
layout_mode = 0
|
||||
offset_left = -36.0
|
||||
offset_top = -57.575
|
||||
offset_right = 234.0
|
||||
offset_bottom = -7.575
|
||||
scale = Vector2(0.63, 0.403)
|
||||
value = 50.0
|
||||
texture_under = ExtResource("4_afpwe")
|
||||
texture_progress = ExtResource("5_5mhew")
|
||||
texture_progress_offset = Vector2(16, 8)
|
||||
|
||||
[node name="ActionPanel" type="Panel" parent="battle_menu"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -36.0
|
||||
offset_top = 93.0
|
||||
offset_right = 6.0
|
||||
offset_bottom = 119.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="ActionState" type="Label" parent="battle_menu/ActionPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -85.0
|
||||
offset_top = -13.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 13.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_font_sizes/font_size = 10
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Combatant" parent="." instance=ExtResource("4_w3vb5")]
|
||||
Stats = SubResource("Resource_28c5l")
|
||||
|
||||
[node name="Actions" type="Node" parent="Combatant"]
|
||||
|
||||
[node name="attack" parent="Combatant/Actions" instance=ExtResource("5_17k7n")]
|
||||
|
||||
[connection signal="action_selected" from="battle_menu" to="." method="do_action"]
|
||||
[connection signal="action_finished" from="Combatant/Actions/attack" to="." method="action_done"]
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1,34 +0,0 @@
|
||||
[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.
@ -1,34 +0,0 @@
|
||||
[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.
@ -1,34 +0,0 @@
|
||||
[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