Add phase icons (not working atm)

This commit is contained in:
Hamcha 2019-05-28 00:58:39 +02:00
parent 6eea894b85
commit aca5b1c72f
Signed by: hamcha
GPG key ID: A40413D21021EAEE
7 changed files with 102 additions and 10 deletions

Binary file not shown.

View file

@ -26,7 +26,7 @@ script = ExtResource( 2 )
transform = Transform( 0.4, 0, 0, 0, 2.98023e-008, -0.4, 0, 0.4, 2.98023e-008, 0, -0.6, -1.3 )
[node name="OppHand" type="Spatial" parent="Camera"]
transform = Transform( 0.3, 0, 0, 0, -1.31134e-008, 0.3, 0, -0.3, -1.31134e-008, -2.48878e-016, 0.629771, -1.3 )
transform = Transform( 0.3, 0, 0, 0, -1.49012e-008, 0.3, 0, -0.3, -1.49012e-008, 0, 0.63, -1.3 )
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.001, 0 )
@ -38,39 +38,39 @@ material/0 = null
[node name="Cards" type="Spatial" parent="."]
[node name="P1Deck" parent="Cards" instance=ExtResource( 5 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.30889, 0, 3.52858 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.309, 0, 2.529 )
title = "Deck"
zoneName = "player1.deck"
faceDown = true
editable = true
[node name="P1Graveyard" parent="Cards" instance=ExtResource( 5 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.23371, 0, 3.52858 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.234, 0, 2.529 )
title = "Discard pile"
zoneName = "player1.graveyard"
editable = true
[node name="P1Banished" parent="Cards" instance=ExtResource( 5 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.23371, 0, 2.40401 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.234, 0, 1.404 )
title = "Banished"
zoneName = "player1.banished"
editable = true
[node name="P2Deck" parent="Cards" instance=ExtResource( 5 )]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 4.309, 0, -3.529 )
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 4.309, 0, -2.529 )
title = "Deck"
zoneName = "player2.deck"
faceDown = true
editable = true
[node name="P2Graveyard" parent="Cards" instance=ExtResource( 5 )]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 5.234, 0, -3.529 )
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 5.234, 0, -2.529 )
title = "Discard pile"
zoneName = "player2.graveyard"
editable = true
[node name="P2Banished" parent="Cards" instance=ExtResource( 5 )]
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 5.234, 0, -2.404 )
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 5.234, 0, -1.404 )
title = "Banished"
zoneName = "player2.banished"
editable = true

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Scenes/Scripts/BoardUI.gd" type="Script" id=1]
[ext_resource path="res://MLPAssets/Placeholders/unknowncard.jpg" type="Texture" id=2]
[ext_resource path="res://Scenes/UI/PhaseIcon.tscn" type="PackedScene" id=3]
[sub_resource type="Animation" id=1]
resource_name = "fade ui card"
@ -41,7 +42,19 @@ tracks/2/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 40.0 ]
"values": [ 20, 60 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("CardZoom:rect_size")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 344, 500 ), Vector2( 344, 500 ) ]
}
[node name="BoardUI" type="Control"]
@ -50,16 +63,40 @@ anchor_bottom = 1.0
mouse_filter = 2
script = ExtResource( 1 )
[node name="Panel" type="Panel" parent="."]
anchor_right = 1.0
margin_bottom = 40.0
[node name="CardZoom" type="TextureRect" parent="."]
visible = false
modulate = Color( 1, 1, 1, 0 )
anchor_bottom = 1.0
margin_left = 40.0
margin_top = 20.0
margin_right = 384.0
margin_bottom = 520.0
margin_bottom = -280.0
rect_scale = Vector2( 0.8, 0.8 )
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource( 2 )
expand = true
stretch_mode = 5
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
"anims/fade ui card" = SubResource( 1 )
[node name="ReadyPhase" parent="." instance=ExtResource( 3 )]
position = Vector2( 565, 40 )
[node name="TroublePhase" parent="." instance=ExtResource( 3 )]
position = Vector2( 615, 40 )
phaseID = 1
[node name="MainPhase" parent="." instance=ExtResource( 3 )]
position = Vector2( 665, 40 )
phaseID = 2
[node name="ScorePhase" parent="." instance=ExtResource( 3 )]
position = Vector2( 715, 40 )
phaseID = 3

8
Scenes/UI/PhaseIcon.gd Normal file
View file

@ -0,0 +1,8 @@
extends Node2D
export var phaseID = 0
const iconSize = 80
func _ready():
$Icon.region_rect.position.x = phaseID * iconSize

13
Scenes/UI/PhaseIcon.tscn Normal file
View file

@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Scenes/UI/PhaseIcon.gd" type="Script" id=1]
[ext_resource path="res://UIAssets/GameBar/phase-icons.png" type="Texture" id=2]
[node name="PhaseIcon" type="Node2D"]
script = ExtResource( 1 )
[node name="Icon" type="Sprite" parent="."]
scale = Vector2( 0.65, 0.65 )
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 0, 0, 80, 80 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/phase-icons.png-d392634a9aaae505bec07ec577a1a735.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UIAssets/GameBar/phase-icons.png"
dest_files=[ "res://.import/phase-icons.png-d392634a9aaae505bec07ec577a1a735.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0