Compare commits
No commits in common. "c96ac0e2d2d9b6b51b67ef0a7de811a830598ae9" and "41c2689e1f541deccda83c2f4f4ab18e55a9e780" have entirely different histories.
c96ac0e2d2
...
41c2689e1f
@ -3,5 +3,3 @@ extends Node
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
$"%Battle".character = $Player
|
$"%Battle".character = $Player
|
||||||
$"%CardContainer".character = $Player
|
|
||||||
$"%DiceContainer".character = $Player
|
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
[gd_scene load_steps=10 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Scenes/Battle.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://Scenes/Battle.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://Characters/Player.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Characters/Player.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://Scenes/BattleScene.gd" type="Script" id=3]
|
[ext_resource path="res://Scenes/BattleScene.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://UI/CardContainer.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://UI/CardContainer.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://UI/DiceContainer.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://UI/DiceView.tscn" type="PackedScene" id=5]
|
||||||
[ext_resource path="res://UI/Card.gd" type="Script" id=6]
|
|
||||||
[ext_resource path="res://Assets/CardDB/Broadsword.tres" type="Resource" id=7]
|
|
||||||
[ext_resource path="res://Management/ActiveController.tscn" type="PackedScene" id=8]
|
[ext_resource path="res://Management/ActiveController.tscn" type="PackedScene" id=8]
|
||||||
[ext_resource path="res://Assets/CardDB/Poisonous apple.tres" type="Resource" id=9]
|
|
||||||
|
|
||||||
[node name="BattleScene" type="Node"]
|
[node name="BattleScene" type="Node"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
@ -17,25 +14,14 @@ script = ExtResource( 3 )
|
|||||||
|
|
||||||
[node name="Battle" parent="ActiveController" instance=ExtResource( 1 )]
|
[node name="Battle" parent="ActiveController" instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
[node name="DiceView" parent="ActiveController" instance=ExtResource( 5 )]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
margin_left = 782.0
|
||||||
|
margin_top = 375.0
|
||||||
|
|
||||||
[node name="CardContainer" parent="ActiveController" instance=ExtResource( 4 )]
|
[node name="CardContainer" parent="ActiveController" instance=ExtResource( 4 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
margin_top = 351.0
|
margin_top = 351.0
|
||||||
margin_right = -425.0
|
margin_right = -425.0
|
||||||
|
|
||||||
[node name="DiceContainer" parent="ActiveController" instance=ExtResource( 5 )]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
margin_left = 782.0
|
|
||||||
margin_top = 375.0
|
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource( 2 )]
|
[node name="Player" parent="." instance=ExtResource( 2 )]
|
||||||
|
|
||||||
[node name="Card1" type="Node" parent="Player"]
|
|
||||||
script = ExtResource( 6 )
|
|
||||||
card_info = ExtResource( 7 )
|
|
||||||
|
|
||||||
[node name="Card2" type="Node" parent="Player"]
|
|
||||||
script = ExtResource( 6 )
|
|
||||||
|
|
||||||
[node name="Card3" type="Node" parent="Player"]
|
|
||||||
script = ExtResource( 6 )
|
|
||||||
card_info = ExtResource( 9 )
|
|
||||||
|
@ -2,16 +2,16 @@ tool
|
|||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
const dice_image_string = "res://Assets/Dice/Dice%s.png"
|
const dice_image_string = "res://Assets/Dice/Dice%s.png"
|
||||||
const hovering_shader = preload("res://UI/RainbowOutline.tres")
|
const selected_shader = preload("res://UI/RainbowOutline.tres")
|
||||||
|
|
||||||
export (int, 0, 6) var dice_value : int = 0
|
export (int, 0, 6) var dice_value : int = 0
|
||||||
export var hovering : bool setget set_hovering
|
export var selected : bool setget set_selected
|
||||||
|
|
||||||
|
|
||||||
func set_hovering(new_value):
|
func set_selected(new_value):
|
||||||
hovering = new_value
|
selected = new_value
|
||||||
if hovering:
|
if selected:
|
||||||
self.material = hovering_shader
|
self.material = selected_shader
|
||||||
else:
|
else:
|
||||||
self.material = null
|
self.material = null
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user