-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
174 additions
and
113 deletions.
There are no files selected for viewing
34 changes: 0 additions & 34 deletions
34
assets/sprites/cards_ilustrations/ilustration_placeholder.png.import
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
[gd_scene format=2] | ||
[gd_scene load_steps=2 format=2] | ||
|
||
[node name="Area2D" type="Area2D"] | ||
[ext_resource path="res://dani_sandbox/scripts/BattleCard.gd" type="Script" id=1] | ||
|
||
[node name="Card" type="Control"] | ||
anchor_right = 0.039 | ||
anchor_bottom = 0.08 | ||
margin_right = 0.0639992 | ||
rect_min_size = Vector2( 40, 48 ) | ||
script = ExtResource( 1 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="Button" type="Button" parent="."] | ||
margin_right = 12.0 | ||
margin_right = 40.0 | ||
margin_bottom = 48.0 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="Label" type="Label" parent="."] | ||
margin_left = 6.0 | ||
margin_top = 6.0 | ||
margin_right = 33.0 | ||
margin_bottom = 20.0 | ||
text = "card" | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://dani_sandbox/scenes/BattleCard.tscn" type="PackedScene" id=1] | ||
[ext_resource path="res://dani_sandbox/scripts/BattleHand.gd" type="Script" id=2] | ||
|
||
[node name="Hand" type="Control"] | ||
anchor_right = 0.086 | ||
anchor_bottom = 0.093 | ||
margin_right = -0.064003 | ||
margin_bottom = 0.199997 | ||
script = ExtResource( 2 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="testing_background" type="ColorRect" parent="."] | ||
visible = false | ||
margin_left = 32.0 | ||
margin_right = 48.0 | ||
margin_bottom = 48.0 | ||
|
||
[node name="HBoxContainer" type="HBoxContainer" parent="."] | ||
margin_right = 84.0 | ||
margin_bottom = 56.0 | ||
grow_horizontal = 0 | ||
grow_vertical = 0 | ||
size_flags_horizontal = 2 | ||
custom_constants/separation = 4 | ||
alignment = 1 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="Card" parent="HBoxContainer" instance=ExtResource( 1 )] | ||
anchor_right = 0.0 | ||
anchor_bottom = 0.0 | ||
margin_right = 40.0 | ||
margin_bottom = 56.0 | ||
|
||
[node name="Card2" parent="HBoxContainer" instance=ExtResource( 1 )] | ||
anchor_right = 0.0 | ||
anchor_bottom = 0.0 | ||
margin_left = 44.0 | ||
margin_right = 84.0 | ||
margin_bottom = 56.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends Control | ||
|
||
signal playerAttack | ||
|
||
var player = "" | ||
var target = "" | ||
var type = "" | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
pass # Replace with function body. | ||
|
||
|
||
func _on_Button_pressed(): | ||
player.get_node("Character").animation = type | ||
player.emit_signal("playerAttack") | ||
player.get_node("Character").play() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends Control | ||
|
||
|
||
# Declare member variables here. Examples: | ||
# var a = 2 | ||
# var b = "text" | ||
var player = "" | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
var cards = $HBoxContainer.get_child_count() | ||
set_custom_minimum_size(Vector2(40*cards, 48)) | ||
_set_size(Vector2(40*cards, 48)) | ||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
#func _process(delta): | ||
# pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
extends "res://dani_sandbox/scripts/BattleCharacter.gd" | ||
|
||
signal playerAttack | ||
|
||
func _ready(): | ||
play_idle() | ||
|
||
|
||
func _process(delta): | ||
pass | ||
|
||
|
||
func _on_Character_animation_finished(): | ||
if $Character.animation == "attack": | ||
play_idle() | ||
|
||
|
||
func play_idle(): | ||
$Character.animation = "idle" | ||
$Character.play() | ||
|
||
|
||
func _on_Battle_Player_playerAttack(): | ||
$Weapon/AnimationPlayer.play("attack") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
extends Button | ||
|
||
signal playCard | ||
|
||
|
||
export var anim = "" | ||
export var player = "" | ||
export var target = "" | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
pass # Replace with function body. | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
#func _process(delta): | ||
# pass | ||
|
||
|
||
func _on_Button_pressed(): | ||
player.animation = anim | ||
player.play() |
This file was deleted.
Oops, something went wrong.