Compare commits
2 Commits
cb28c15a0e
...
c68a84f99b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c68a84f99b | ||
![]() |
363c53d0e7 |
@ -9,12 +9,18 @@
|
|||||||
config_version=4
|
config_version=4
|
||||||
|
|
||||||
_global_script_classes=[ {
|
_global_script_classes=[ {
|
||||||
|
"base": "Node",
|
||||||
|
"class": "BaseMove",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://src/nodes/moves/BaseMove.gd"
|
||||||
|
}, {
|
||||||
"base": "Node2D",
|
"base": "Node2D",
|
||||||
"class": "Unit",
|
"class": "Unit",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://src/classes/Unit.gd"
|
"path": "res://src/classes/Unit.gd"
|
||||||
} ]
|
} ]
|
||||||
_global_script_class_icons={
|
_global_script_class_icons={
|
||||||
|
"BaseMove": "",
|
||||||
"Unit": ""
|
"Unit": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,3 +115,16 @@ func _physics_process(delta: float) -> void:
|
|||||||
emit_signal("turn_completed")
|
emit_signal("turn_completed")
|
||||||
_has_sent_turn_completed = true
|
_has_sent_turn_completed = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_move_selected(move_num) -> void:
|
||||||
|
|
||||||
|
#get move properties TODO
|
||||||
|
var target_move = get_node(("Move" + move_num))
|
||||||
|
|
||||||
|
var move_name = target_move.getName()
|
||||||
|
var move_damage = target_move.getDamage()
|
||||||
|
var move_points = target_move.getPoints()
|
||||||
|
var move_pattern = target_move.getPattern()
|
||||||
|
|
||||||
|
#run attack function
|
||||||
|
attack(move_damage, move_points, move_pattern)
|
||||||
|
@ -120,7 +120,6 @@ texture = ExtResource( 2 )
|
|||||||
position = Vector2( 2, -12 )
|
position = Vector2( 2, -12 )
|
||||||
hframes = 4
|
hframes = 4
|
||||||
vframes = 6
|
vframes = 6
|
||||||
frame = 12
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
autoplay = "Idle"
|
autoplay = "Idle"
|
||||||
@ -136,3 +135,5 @@ anims/Idle = SubResource( 5 )
|
|||||||
[node name="UnitPopup" parent="Canvas" instance=ExtResource( 3 )]
|
[node name="UnitPopup" parent="Canvas" instance=ExtResource( 3 )]
|
||||||
margin_right = 40.0
|
margin_right = 40.0
|
||||||
margin_bottom = 88.0
|
margin_bottom = 88.0
|
||||||
|
|
||||||
|
[connection signal="move_selected" from="Canvas/UnitPopup" to="." method="_on_move_selected"]
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
extends PopupPanel
|
extends PopupPanel
|
||||||
|
|
||||||
|
signal move_selected(move_num)
|
||||||
|
|
||||||
func _move_selected(move_num: int) -> void:
|
func _move_selected(move_num: int) -> void:
|
||||||
print(move_num)
|
print(move_num)
|
||||||
hide()
|
hide()
|
||||||
|
emit_signal("move_selected", move_num)
|
||||||
|
16
src/nodes/moves/BaseMove.gd
Normal file
16
src/nodes/moves/BaseMove.gd
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
extends Node
|
||||||
|
class_name BaseMove
|
||||||
|
|
||||||
|
export var title : String = "Move"
|
||||||
|
export var power : int = 0
|
||||||
|
export (String,
|
||||||
|
"Normal", "Fire", "Water",
|
||||||
|
"Grass", "Sound") var type : String = "Normal" #TODEC
|
||||||
|
export (int, "Physical", "Special", "Status") var catagory : int #TODEC
|
||||||
|
export var accuracy : int = 100 #TODEC
|
||||||
|
export var makes_contact : bool = false #TODEC
|
||||||
|
export var points : int = 3
|
||||||
|
export var effect1 : String
|
||||||
|
export var effect2 : String
|
||||||
|
export var effect3 : String
|
||||||
|
export (String, MULTILINE) var description : String
|
6
src/nodes/moves/BaseMove.tscn
Normal file
6
src/nodes/moves/BaseMove.tscn
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/nodes/moves/BaseMove.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="BaseMove" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
Loading…
x
Reference in New Issue
Block a user