Compare commits

..

2 commits

Author SHA1 Message Date
72c6e49a06
Add set loading and parsing, also minor things 2019-06-29 11:46:33 +02:00
c8cc26cbce
More work on draft page 2019-06-13 00:36:35 +02:00
36 changed files with 1104 additions and 279 deletions

4
.gitignore vendored
View file

@ -1,2 +1,4 @@
.import
*.zip
*.zip
Cards/*
Music/*

Binary file not shown.

11
CREDITS.md Normal file
View file

@ -0,0 +1,11 @@
Some assets come from fellow MLP fans and artists:
- [**Ninja Applejack** by Yetioner](https://www.deviantart.com/yetioner/art/Ninja-Applejack-663088882)
- [**Fluttershy is best singer!** by MacTavish1996](https://www.deviantart.com/mactavish1996/art/Fluttershy-is-best-singer-435068869)
- [**Pinkie: 'Tall ceilings' (S05E03)** by DJDavid98](https://www.deviantart.com/djdavid98/art/Pinkie-Tall-ceilings-S05E03-532855027)
- [**excited Rainbow Dash** by CloudyGlow](https://www.deviantart.com/cloudyglow/art/excited-Rainbow-Dash-730032632)
- [**Rarity Falling in joy** by Yetioner](https://www.deviantart.com/yetioner/art/Rarity-Falling-in-joy-600727887)
The following Sound effects from Freesound were used:
- [**long wispy woosh1.wav** by newagesoup](https://freesound.org/people/newagesoup/sounds/377830/)

View file

@ -2,26 +2,23 @@
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.s3tc.stex"
path.etc2="res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.etc2.stex"
path.etc="res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.etc.stex"
path="res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.stex"
metadata={
"imported_formats": [ "bptc", "s3tc", "etc2", "etc" ],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://MLPAssets/Background/boardbg.jpg"
dest_files=[ "res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.s3tc.stex", "res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.etc2.stex", "res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.etc.stex" ]
dest_files=[ "res://.import/boardbg.jpg-892d674dbade1effb8d6d07916c18ae8.stex" ]
[params]
compress/mode=2
compress/mode=1
compress/lossy_quality=0.8
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false

View file

@ -14,11 +14,11 @@ dest_files=[ "res://.import/deckbuilderbg.png-68f7a3ffd5ce19875a051fc28635d04a.s
[params]
compress/mode=0
compress/mode=1
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false

View file

@ -14,11 +14,11 @@ dest_files=[ "res://.import/hall.png-ab06c7a881e71434043816d73db7a17c.stex" ]
[params]
compress/mode=0
compress/mode=1
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false

View file

@ -14,11 +14,11 @@ dest_files=[ "res://.import/library.webp-ce7da1a8796349bdd0765298e794a99f.stex"
[params]
compress/mode=0
compress/mode=1
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false

View file

@ -14,11 +14,11 @@ dest_files=[ "res://.import/menubg.webp-efa045427b363071ed65b7b82df60ac9.stex" ]
[params]
compress/mode=0
compress/mode=1
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false

View file

@ -2,22 +2,19 @@
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.s3tc.stex"
path.etc2="res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.etc2.stex"
path.etc="res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.etc.stex"
path="res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.stex"
metadata={
"imported_formats": [ "bptc", "s3tc", "etc2", "etc" ],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://MLPAssets/Placeholders/unknowncard.jpg"
dest_files=[ "res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.s3tc.stex", "res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.etc2.stex", "res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.etc.stex" ]
dest_files=[ "res://.import/unknowncard.jpg-ff165d2aeb957f4e1010ac777150182d.stex" ]
[params]
compress/mode=2
compress/mode=1
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0

View file

@ -2,29 +2,26 @@
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.s3tc.stex"
path.etc2="res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.etc2.stex"
path.etc="res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.etc.stex"
path="res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.stex"
metadata={
"imported_formats": [ "bptc", "s3tc", "etc2", "etc" ],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://MLPAssets/Textures/CardBack.png"
dest_files=[ "res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.s3tc.stex", "res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.etc2.stex", "res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.etc.stex" ]
dest_files=[ "res://.import/CardBack.png-c3e28c09100eabc5562ed76709826ce0.stex" ]
[params]
compress/mode=2
compress/mode=1
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
compress/normal_map=2
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=1
process/fix_alpha_border=true

View file

@ -32,11 +32,12 @@ onready var texture: Texture = cardImage.get_surface_material(0)
func set_cardid(val: String):
cardID = val
if ready:
if ready and cardID != "":
Resources.get_card(val, self, "_card_fetched")
func _ready():
Resources.get_card(cardID, self, "_card_fetched")
if cardID != "":
Resources.get_card(cardID, self, "_card_fetched")
ready = true
func _mouse_hover():

View file

@ -263,7 +263,6 @@ transform = Transform( 1, 0, 0, 0, 1.17955, 0, 0, 0, 1, 0, 0.000197917, 0 )
shape = SubResource( 1 )
[node name="CardModel" type="Spatial" parent="."]
transform = Transform( 0.999409, 0.0343663, 0, -0.0343663, 0.999409, 0, 0, 0, 1, 0, 0.0986242, 0 )
[node name="Border" type="MeshInstance" parent="CardModel"]
mesh = ExtResource( 2 )

View file

@ -0,0 +1,31 @@
extends Control
var cardID := "" setget set_cardid
var ready = false
func set_cardid(val: String):
cardID = val
if cardID != "":
Resources.get_card(val, self, "_card_fetched")
# warning-ignore:unused_argument
func _card_fetched(result: int, response_code: int, headers: PoolStringArray, body: PoolByteArray):
assert(result == HTTPRequest.RESULT_SUCCESS)
var img = Image.new()
var err = img.load_webp_from_buffer(body)
assert(err == OK)
if img.get_width() > img.get_height():
rect_min_size = Vector2(480,344)
rect_size = Vector2(480,344)
else:
rect_min_size = Vector2(344,480)
rect_size = Vector2(344,480)
var texture := ImageTexture.new()
texture.create_from_image(img)
$TextureRect.texture = texture
func fadein():
$AnimationPlayer.play("zoom-fadein")
func fadeout():
$AnimationPlayer.play("zoom-fadeout")

View file

@ -0,0 +1,156 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://Scenes/DeckBuilder/CardZoom.gd" type="Script" id=1]
[ext_resource path="res://UIAssets/Effects/FadeBorder.shader" type="Shader" id=2]
[ext_resource path="res://MLPAssets/Placeholders/unknowncard.jpg" type="Texture" id=3]
[sub_resource type="ShaderMaterial" id=1]
resource_local_to_scene = true
shader = ExtResource( 2 )
shader_param/effect_color = Color( 0.262745, 0.72549, 0.976471, 0.537255 )
shader_param/effect_width = 0.05
shader_param/effect_offset = 0.01
[sub_resource type="Animation" id=2]
resource_name = "zoom-fadein"
length = 0.2
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.05, 0.15 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:visible")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.05 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ false, true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("TextureRect:rect_position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.05, 0.15 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 38.9606, 101.817 ), Vector2( 0, 0 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("TextureRect:rect_scale")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.05, 0.15 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0.9, 0.9 ), Vector2( 1, 1 ) ]
}
[sub_resource type="Animation" id=3]
resource_name = "zoom-fadeout"
length = 0.2
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:visible")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.1, 0.15 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("TextureRect:rect_position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 30, 0 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("TextureRect:rect_scale")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ) ]
}
[node name="CardZoom" type="Control"]
visible = false
modulate = Color( 1, 1, 1, 0 )
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -936.0
margin_bottom = -320.0
rect_min_size = Vector2( 344, 480 )
mouse_filter = 2
script = ExtResource( 1 )
[node name="ColorRect" type="ColorRect" parent="."]
material = SubResource( 1 )
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -20.0
margin_top = -20.0
margin_right = 20.0
margin_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="TextureRect" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 30.0
margin_right = 30.0
margin_bottom = -0.00012207
mouse_filter = 2
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/zoom-fadein = SubResource( 2 )
anims/zoom-fadeout = SubResource( 3 )

View file

@ -0,0 +1,47 @@
extends Control
signal card_selected()
signal card_unselected()
signal card_hover(position)
signal card_clicked()
signal loaded()
var cardID := "" setget set_cardid
var ready = false
func set_cardid(val: String):
cardID = val
if ready and cardID != "":
Resources.get_card(val, self, "_card_fetched")
func _ready():
if cardID != "":
Resources.get_card(cardID, self, "_card_fetched")
ready = true
func _gui_input(event):
# Left click
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and event.pressed:
accept_event()
emit_signal("card_clicked")
if event is InputEventMouseMotion:
emit_signal("card_hover", event.position)
func _mouse_entered():
$AnimationPlayer.play("glow")
emit_signal("card_selected")
func _mouse_exited():
$AnimationPlayer.play_backwards("glow")
emit_signal("card_unselected")
# warning-ignore:unused_argument
func _card_fetched(result: int, response_code: int, headers: PoolStringArray, body: PoolByteArray):
assert(result == HTTPRequest.RESULT_SUCCESS)
var img = Image.new()
var err = img.load_webp_from_buffer(body)
assert(err == OK)
var texture := ImageTexture.new()
texture.create_from_image(img)
$TextureRect.texture = texture
emit_signal("loaded")

View file

@ -0,0 +1,70 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Scenes/DeckBuilder/UICard.gd" type="Script" id=1]
[ext_resource path="res://UIAssets/Effects/FadeBorder.shader" type="Shader" id=2]
[ext_resource path="res://MLPAssets/Placeholders/unknowncard.jpg" type="Texture" id=3]
[sub_resource type="ShaderMaterial" id=1]
resource_local_to_scene = true
shader = ExtResource( 2 )
shader_param/effect_color = Color( 0.0117647, 0.768627, 1, 0 )
shader_param/effect_width = 0.1
shader_param/effect_offset = 0.0
[sub_resource type="Animation" id=2]
resource_name = "glow"
length = 0.1
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath("ColorRect:material:shader_param/effect_color")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 0.0117647, 0.768627, 1, 0 ), Color( 0.0117647, 0.768627, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("ColorRect:material:shader_param/effect_width")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.1, 0.05 ]
}
[node name="UICard" type="Control"]
margin_right = 344.0
margin_bottom = 480.0
rect_min_size = Vector2( 344, 480 )
rect_pivot_offset = Vector2( 172, 240 )
script = ExtResource( 1 )
[node name="ColorRect" type="ColorRect" parent="."]
material = SubResource( 1 )
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -20.0
margin_top = -20.0
margin_right = 20.0
margin_bottom = 20.0
[node name="TextureRect" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/glow = SubResource( 2 )
[connection signal="gui_input" from="." to="." method="_gui_input"]
[connection signal="mouse_entered" from="." to="." method="_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_mouse_exited"]

View file

@ -1,12 +1,18 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Scenes/Scripts/Draft.gd" type="Script" id=1]
[ext_resource path="res://MLPAssets/Background/hall.png" type="Texture" id=2]
[ext_resource path="res://MLPAssets/Placeholders/unknowncard.jpg" type="Texture" id=3]
[ext_resource path="res://Scenes/Shared/CardList.tscn" type="PackedScene" id=3]
[ext_resource path="res://Scenes/DeckBuilder/CardZoom.tscn" type="PackedScene" id=4]
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 1 )
[node name="hall" type="TextureRect" parent="."]
@ -28,229 +34,30 @@ margin_bottom = -20.0
mouse_filter = 1
scroll_horizontal_enabled = false
[node name="PickedCardList" type="VBoxContainer" parent="PickedCardListScroll"]
margin_right = 220.0
margin_bottom = 760.0
rect_min_size = Vector2( 220, 0 )
size_flags_vertical = 3
[node name="PickedCardList" parent="PickedCardListScroll" instance=ExtResource( 3 )]
[node name="ManeLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_right = 220.0
margin_bottom = 23.0
rect_min_size = Vector2( 0, 23 )
text = "Mane"
valign = 1
[node name="Mane" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
margin_right = 220.0
[node name="EntryLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_top = 31.0
margin_right = 220.0
margin_bottom = 54.0
rect_min_size = Vector2( 0, 23 )
text = "Entry"
valign = 1
[node name="Entry" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
margin_top = 4.0
margin_right = 220.0
margin_bottom = 4.0
[node name="FriendsLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_top = 62.0
margin_right = 220.0
margin_bottom = 85.0
rect_min_size = Vector2( 0, 23 )
text = "Friends"
valign = 1
[node name="Friends" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
margin_top = 8.0
margin_right = 220.0
margin_bottom = 8.0
[node name="ResourcesLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_top = 93.0
margin_right = 220.0
margin_bottom = 116.0
rect_min_size = Vector2( 0, 23 )
text = "Resources"
valign = 1
[node name="Resources" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
margin_top = 12.0
margin_right = 220.0
margin_bottom = 12.0
[node name="EventsLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_top = 124.0
margin_right = 220.0
margin_bottom = 147.0
rect_min_size = Vector2( 0, 23 )
text = "Events"
valign = 1
[node name="Events" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
margin_top = 16.0
margin_right = 220.0
margin_bottom = 16.0
[node name="TroublemakersLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_top = 155.0
margin_right = 220.0
margin_bottom = 178.0
rect_min_size = Vector2( 0, 23 )
text = "Troublemakers"
valign = 1
[node name="Troublemakers" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_bottom = 1.0
margin_left = 20.0
margin_top = 20.0
margin_right = 220.0
margin_bottom = 20.0
[node name="ProblemsLabel" type="Label" parent="PickedCardListScroll/PickedCardList"]
visible = false
margin_top = 186.0
margin_right = 220.0
margin_bottom = 209.0
rect_min_size = Vector2( 0, 23 )
text = "Problems"
valign = 1
[node name="Problems" type="VBoxContainer" parent="PickedCardListScroll/PickedCardList"]
margin_top = 24.0
margin_right = 220.0
margin_bottom = 24.0
[node name="Cards" type="GridContainer" parent="."]
editor/display_folded = true
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 234.076
margin_top = 40.1522
margin_right = 400.0
margin_bottom = 688.152
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -350.0
margin_top = -376.0
margin_right = 1056.0
margin_bottom = 1084.0
grow_horizontal = 2
grow_vertical = 2
rect_scale = Vector2( 0.5, 0.5 )
custom_constants/vseparation = 10
custom_constants/hseparation = 10
columns = 4
[node name="unknowncard" type="TextureRect" parent="Cards"]
margin_right = 344.0
margin_bottom = 480.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard8" type="TextureRect" parent="Cards"]
margin_left = 348.0
margin_right = 692.0
margin_bottom = 480.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard4" type="TextureRect" parent="Cards"]
margin_left = 696.0
margin_right = 1040.0
margin_bottom = 480.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard10" type="TextureRect" parent="Cards"]
margin_left = 1044.0
margin_right = 1388.0
margin_bottom = 480.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard2" type="TextureRect" parent="Cards"]
margin_top = 484.0
margin_right = 344.0
margin_bottom = 964.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard7" type="TextureRect" parent="Cards"]
margin_left = 348.0
margin_top = 484.0
margin_right = 692.0
margin_bottom = 964.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard5" type="TextureRect" parent="Cards"]
margin_left = 696.0
margin_top = 484.0
margin_right = 1040.0
margin_bottom = 964.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard12" type="TextureRect" parent="Cards"]
margin_left = 1044.0
margin_top = 484.0
margin_right = 1388.0
margin_bottom = 964.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard3" type="TextureRect" parent="Cards"]
margin_top = 968.0
margin_right = 344.0
margin_bottom = 1448.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard9" type="TextureRect" parent="Cards"]
margin_left = 348.0
margin_top = 968.0
margin_right = 692.0
margin_bottom = 1448.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard6" type="TextureRect" parent="Cards"]
margin_left = 696.0
margin_top = 968.0
margin_right = 1040.0
margin_bottom = 1448.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="unknowncard11" type="TextureRect" parent="Cards"]
margin_left = 1044.0
margin_top = 968.0
margin_right = 1388.0
margin_bottom = 1448.0
rect_min_size = Vector2( 344, 480 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
[node name="CardZoom" parent="." instance=ExtResource( 4 )]
rect_scale = Vector2( 0.8, 0.8 )

77
Scenes/Global/CardData.gd Normal file
View file

@ -0,0 +1,77 @@
extends Node
var loadedSets := {}
var loadedCards := {}
class CardInfo:
var id := "unknown"
var name := "Unknown card"
var subname := "--"
var colors := []
var keywords := []
var traits := []
var requirements := {}
var cost := 0
var power := 0
var type := "None"
var text := "This card does not exist, if you see it it's because something failed loading"
var rarity := "UR"
var bonus := 0
var opponentPower := 0
func _init(cardEntry: Dictionary):
if not cardEntry.empty():
id = cardEntry.ID
name = cardEntry.Name
subname = cardEntry.Subname
colors = cardEntry.Element
keywords = cardEntry.Keywords
traits = cardEntry.Traits
type = cardEntry.Type
text = cardEntry.Text
rarity = cardEntry.Rarity
if cardEntry.has("Power"):
power = cardEntry.Power
if cardEntry.has("Cost"):
cost = cardEntry.Cost
if cardEntry.has("ProblemBonus"):
bonus = cardEntry.ProblemBonus
if cardEntry.has("Requirement"):
requirements = cardEntry.Requirement
elif cardEntry.has("ProblemRequirement"):
requirements = cardEntry.ProblemRequirement
if cardEntry.has("ProblemOpponentPower"):
opponentPower = cardEntry.ProblemOpponentPower
func _ready():
# Search for sets in MLPData
var dir := Directory.new()
var err := dir.change_dir("res://MLPData/Sets")
if err != OK:
print(err)
dir.list_dir_begin(true, true)
while true:
var next := dir.get_next()
if next == "":
break
# Check for cached resource
var file := File.new()
file.open("res://MLPData/Sets/" + next, File.READ)
var result = parse_json(file.get_as_text())
if typeof(result) == TYPE_DICTIONARY:
loadedSets[next] = result.Name
add_to_dict(result.Cards)
print("Loaded set: ", result.Name, " (", next, ", ", len(result.Cards), " cards)")
else:
breakpoint
func add_to_dict(cards: Array):
for card in cards:
loadedCards[card.ID] = CardInfo.new(card)
func get_by_id(id: String) -> CardInfo:
if not loadedCards.has(id):
print("[WARN] Trying to get unknown card: ", id)
#TODO return error or something
return CardInfo.new({})
return loadedCards[id]

View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/Global/CardData.gd" type="Script" id=1]
[node name="Node" type="Node"]
script = ExtResource( 1 )

View file

@ -3,4 +3,7 @@ extends Control
signal loaded()
func _ready():
# Load bgm
BGM.load_music("lobby")
emit_signal("loaded")

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Scenes/Lobby.gd" type="Script" id=1]
[ext_resource path="res://MLPAssets/Background/menubg.webp" type="Texture" id=2]
[ext_resource path="res://Scenes/Lobby/RoomEntry.tscn" type="PackedScene" id=3]
[node name="Lobby" type="Control"]
anchor_right = 1.0
@ -11,6 +12,26 @@ script = ExtResource( 1 )
[node name="TextureRect" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -1.29236
margin_right = -1.29236
texture = ExtResource( 2 )
expand = true
stretch_mode = 7
[node name="ScrollContainer" type="ScrollContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 30.0
margin_top = 100.0
margin_right = -30.0
margin_bottom = -300.0
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
margin_right = 1220.0
margin_bottom = 400.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Control" parent="ScrollContainer/VBoxContainer" instance=ExtResource( 3 )]
anchor_right = 0.0
margin_right = 1220.0

View file

@ -0,0 +1,8 @@
[gd_scene format=2]
[node name="RoomEntry" type="Panel"]
anchor_right = 1.0
margin_right = -280.0
margin_bottom = 50.0
rect_min_size = Vector2( 0, 50 )
size_flags_horizontal = 3

View file

@ -1,21 +1,65 @@
extends Control
var blocks = {
"mane": $PickedCardListScroll/PickedCardList/Mane,
"entry": $PickedCardListScroll/PickedCardList/Entry,
"friend": $PickedCardListScroll/PickedCardList/Friends,
"resource": $PickedCardListScroll/PickedCardList/Resources,
"event": $PickedCardListScroll/PickedCardList/Events,
"troublemaker": $PickedCardListScroll/PickedCardList/Troublemakers,
"problem": $PickedCardListScroll/PickedCardList/Problems
}
onready var CardList = $PickedCardListScroll/PickedCardList
var labels = {
"mane": $PickedCardListScroll/PickedCardList/ManeLabel,
"entry": $PickedCardListScroll/PickedCardList/EntryLabel,
"friend": $PickedCardListScroll/PickedCardList/FriendsLabel,
"resource": $PickedCardListScroll/PickedCardList/ResourcesLabel,
"event": $PickedCardListScroll/PickedCardList/EventsLabel,
"troublemaker": $PickedCardListScroll/PickedCardList/TroublemakersLabel,
"problem": $PickedCardListScroll/PickedCardList/ProblemsLabel
}
var CardUI := preload("res://Scenes/DeckBuilder/UICard.tscn")
func _ready():
add_card("pr1")
add_card("pr10")
add_card("pr20")
add_card("pr30")
add_card("pr166")
add_card("pr171")
add_card("pr16")
add_card("pr171")
add_card("pr1")
add_card("pr10")
add_card("pr20")
add_card("pr30")
func add_card(cardID: String):
var card := CardUI.instance()
card.cardID = cardID
card.connect("card_selected", self, "_card_selected", [cardID])
card.connect("card_unselected", self, "_card_unselected")
card.connect("card_hover", self, "_mouse_on_card", [card])
card.connect("card_clicked", self, "_card_picked", [cardID])
$Cards.add_child(card)
func clear_cards():
for card in $Cards.get_children():
card.queue_free()
func _card_selected(cardID: String):
$CardZoom.cardID = cardID
$CardZoom.fadein()
func _card_unselected():
$CardZoom.fadeout()
func _card_picked(cardID: String):
CardList.add_card(cardID)
$CardZoom.fadeout()
#clear_cards()
const yMargin = 5
const xEdge = 200
const yEdge = 10
func _mouse_on_card(position: Vector2, card: Control):
# THIS IS A MESS
# Should be cleaned but there are way too many scaling things to keep track of
# and it's midnight right now
var pos: Vector2 = card.rect_position * $Cards.rect_scale
var cardpos: Vector2 = $Cards.rect_position + card.rect_position * $Cards.rect_scale
if $CardZoom.rect_size.x > rect_size.x - cardpos.x - xEdge:
pos.x -= $CardZoom.rect_size.x * $CardZoom.rect_scale.x
else:
pos.x += card.rect_size.x * $Cards.rect_scale.x
pos.y -= ($CardZoom.rect_size.y * $CardZoom.rect_scale.y)/4
if pos.y < yMargin:
pos.y = yMargin
elif $CardZoom.rect_size.y > rect_size.y - cardpos.y - yEdge:
pos.y = rect_size.y - $CardZoom.rect_size.y - yMargin
$CardZoom.rect_position = $Cards.rect_position + pos

66
Scenes/Shared/CardList.gd Normal file
View file

@ -0,0 +1,66 @@
extends VBoxContainer
onready var blocks = {
"mane": $Mane,
"entry": $Entry,
"friend": $Friends,
"resource": $Resources,
"event": $Events,
"troublemaker": $Troublemakers,
"problem": $Problems
}
onready var labels = {
"mane": $ManeLabel,
"entry": $EntryLabel,
"friend": $FriendsLabel,
"resource": $ResourcesLabel,
"event": $EventsLabel,
"troublemaker": $TroublemakersLabel,
"problem": $ProblemsLabel
}
var CardListItem := preload("res://Scenes/Shared/CardList/CardListItem.tscn")
func add_card(cardID: String):
# Get card data from ID
var data := CardData.get_by_id(cardID)
var item := CardListItem.instance()
item.cardName = data.name
item.cardSubname = data.subname
item.showCost = has_cost(data.type)
item.cardCost = data.cost
item.color = to_color_ids(data.colors)
blocks["entry"].add_child(item)
var colorTable = {
"Loyalty": "blue",
"Generosity": "white",
"Magic": "purple",
"Laughter": "pink",
"Kindness": "yellow",
"Honesty": "orange"
}
func to_color_ids(ogcolors: Array) -> String:
var newcol := []
for ogcol in ogcolors:
if colorTable.has(ogcol):
newcol.push_back(colorTable[ogcol])
match newcol.size():
0:
return "none"
1:
return newcol[0]
_:
var multistr := "multi|"
for col in newcol:
multistr += col+"+"
return multistr.trim_suffix("+")
func has_cost(type: String) -> bool:
match type:
"Friend", "Resource", "Event":
return true
_:
return false

105
Scenes/Shared/CardList.tscn Normal file
View file

@ -0,0 +1,105 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/Shared/CardList.gd" type="Script" id=1]
[node name="PickedCardList" type="VBoxContainer"]
margin_right = 220.0
margin_bottom = 761.0
rect_min_size = Vector2( 220, 0 )
size_flags_vertical = 3
script = ExtResource( 1 )
[node name="ManeLabel" type="Label" parent="."]
visible = false
margin_right = 220.0
margin_bottom = 23.0
rect_min_size = Vector2( 0, 23 )
text = "Mane"
valign = 1
[node name="Mane" type="VBoxContainer" parent="."]
margin_right = 220.0
[node name="EntryLabel" type="Label" parent="."]
visible = false
margin_top = 4.0
margin_right = 220.0
margin_bottom = 27.0
rect_min_size = Vector2( 0, 23 )
text = "Entry"
valign = 1
[node name="Entry" type="VBoxContainer" parent="."]
margin_top = 4.0
margin_right = 220.0
margin_bottom = 4.0
[node name="FriendsLabel" type="Label" parent="."]
visible = false
margin_top = 8.0
margin_right = 220.0
margin_bottom = 31.0
rect_min_size = Vector2( 0, 23 )
text = "Friends"
valign = 1
[node name="Friends" type="VBoxContainer" parent="."]
margin_top = 8.0
margin_right = 220.0
margin_bottom = 8.0
[node name="ResourcesLabel" type="Label" parent="."]
visible = false
margin_top = 12.0
margin_right = 220.0
margin_bottom = 35.0
rect_min_size = Vector2( 0, 23 )
text = "Resources"
valign = 1
[node name="Resources" type="VBoxContainer" parent="."]
margin_top = 12.0
margin_right = 220.0
margin_bottom = 12.0
[node name="EventsLabel" type="Label" parent="."]
visible = false
margin_top = 16.0
margin_right = 220.0
margin_bottom = 39.0
rect_min_size = Vector2( 0, 23 )
text = "Events"
valign = 1
[node name="Events" type="VBoxContainer" parent="."]
margin_top = 16.0
margin_right = 220.0
margin_bottom = 16.0
[node name="TroublemakersLabel" type="Label" parent="."]
visible = false
margin_top = 20.0
margin_right = 220.0
margin_bottom = 43.0
rect_min_size = Vector2( 0, 23 )
text = "Troublemakers"
valign = 1
[node name="Troublemakers" type="VBoxContainer" parent="."]
margin_top = 20.0
margin_right = 220.0
margin_bottom = 20.0
[node name="ProblemsLabel" type="Label" parent="."]
visible = false
margin_top = 24.0
margin_right = 220.0
margin_bottom = 47.0
rect_min_size = Vector2( 0, 23 )
text = "Problems"
valign = 1
[node name="Problems" type="VBoxContainer" parent="."]
margin_top = 24.0
margin_right = 220.0
margin_bottom = 24.0

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Scenes/Draft/CardListItem.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Shared/CardList/CardListItem.gd" type="Script" id=1]
[ext_resource path="res://UIAssets/Fonts/Catamaran-Bold.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://UIAssets/Fonts/Catamaran-Light.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://MLPAssets/Icons/flat-cost.png" type="Texture" id=4]

254
Scenes/TitleScreen.tscn Normal file
View file

@ -0,0 +1,254 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://UIAssets/mane6start.png" type="Texture" id=1]
[ext_resource path="res://UIAssets/Sounds/low_woosh.wav" type="AudioStream" id=2]
[sub_resource type="Animation" id=1]
resource_name = "FadeIn"
length = 3.5
tracks/0/type = "value"
tracks/0/path = NodePath("TS:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.5, 2.9 ),
"transitions": PoolRealArray( 0.450625, 0.450625, 0.999999 ),
"update": 0,
"values": [ Vector2( 655.393, 702.101 ), Vector2( 655.393, 702.101 ), Vector2( 656.979, 500 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("TS:modulate")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 1.5, 2.3 ),
"transitions": PoolRealArray( 1, 0.392292, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("PP:position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.9, 1.2 ),
"transitions": PoolRealArray( 1, 0.5, 1 ),
"update": 0,
"values": [ Vector2( 599.236, 504.842 ), Vector2( 599.236, 504.842 ), Vector2( 319.982, 603.216 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("PP:modulate")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 0.9, 1.2 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("FS:position")
tracks/4/interp = 2
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 0.3, 0.6 ),
"transitions": PoolRealArray( 1, 0.5, 1 ),
"update": 0,
"values": [ Vector2( 559.227, 368.769 ), Vector2( 559.227, 368.769 ), Vector2( 299.012, 292.608 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("FS:modulate")
tracks/5/interp = 2
tracks/5/loop_wrap = true
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0, 0.3, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("RD:position")
tracks/6/interp = 2
tracks/6/loop_wrap = true
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/keys = {
"times": PoolRealArray( 0, 0.7, 1 ),
"transitions": PoolRealArray( 1, 0.5, 1 ),
"update": 0,
"values": [ Vector2( 630.323, 392.166 ), Vector2( 630.323, 392.166 ), Vector2( 630.323, 247.779 ) ]
}
tracks/7/type = "value"
tracks/7/path = NodePath("RD:modulate")
tracks/7/interp = 2
tracks/7/loop_wrap = true
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/keys = {
"times": PoolRealArray( 0, 0.7, 1 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/8/type = "value"
tracks/8/path = NodePath("AJ:position")
tracks/8/interp = 2
tracks/8/loop_wrap = true
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/keys = {
"times": PoolRealArray( 0, 1.2, 1.5 ),
"transitions": PoolRealArray( 1, 0.5, 1 ),
"update": 0,
"values": [ Vector2( 767.327, 325.855 ), Vector2( 767.327, 325.855 ), Vector2( 1008.5, 278.254 ) ]
}
tracks/9/type = "value"
tracks/9/path = NodePath("AJ:modulate")
tracks/9/interp = 2
tracks/9/loop_wrap = true
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/keys = {
"times": PoolRealArray( 0, 1.2, 1.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/10/type = "value"
tracks/10/path = NodePath("RR:position")
tracks/10/interp = 2
tracks/10/loop_wrap = true
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/keys = {
"times": PoolRealArray( 0, 0.5, 0.8 ),
"transitions": PoolRealArray( 1, 0.5, 1 ),
"update": 0,
"values": [ Vector2( 744.717, 476.045 ), Vector2( 744.717, 476.045 ), Vector2( 1008.5, 598.14 ) ]
}
tracks/11/type = "value"
tracks/11/path = NodePath("RR:modulate")
tracks/11/interp = 2
tracks/11/loop_wrap = true
tracks/11/imported = false
tracks/11/enabled = true
tracks/11/keys = {
"times": PoolRealArray( 0, 0.5, 0.8 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/12/type = "audio"
tracks/12/path = NodePath("Channel1")
tracks/12/interp = 1
tracks/12/loop_wrap = true
tracks/12/imported = false
tracks/12/enabled = true
tracks/12/keys = {
"clips": [ {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource( 2 )
}, {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource( 2 )
}, {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource( 2 )
} ],
"times": PoolRealArray( 0.2, 0.7, 1.1 )
}
tracks/13/type = "audio"
tracks/13/path = NodePath("Channel2")
tracks/13/interp = 1
tracks/13/loop_wrap = true
tracks/13/imported = false
tracks/13/enabled = true
tracks/13/keys = {
"clips": [ {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource( 2 )
}, {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource( 2 )
} ],
"times": PoolRealArray( 0.4, 0.9 )
}
[node name="TitleScreen" type="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -640.0
margin_top = -400.0
margin_right = 640.0
margin_bottom = 400.0
[node name="RD" type="Sprite" parent="."]
position = Vector2( 630.323, 247.779 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 3.0625, -0.241745, 357.39, 576.697 )
[node name="FS" type="Sprite" parent="."]
position = Vector2( 299.012, 292.608 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 850.711, 1.36916, 538.217, 391.606 )
[node name="AJ" type="Sprite" parent="."]
position = Vector2( 1008.5, 278.254 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( -7.22717, 592.3, 422.556, 379.131 )
[node name="RR" type="Sprite" parent="."]
position = Vector2( 1008.5, 598.14 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 362.65, -8.27631, 466.841, 383.89 )
[node name="PP" type="Sprite" parent="."]
position = Vector2( 319.982, 603.216 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 846.772, 430.27, 542.718, 340.81 )
[node name="TS" type="Sprite" parent="."]
position = Vector2( 656.979, 500 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 429.027, 395.82, 401.907, 578.254 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "FadeIn"
anims/FadeIn = SubResource( 1 )
[node name="Channel1" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 2 )
[node name="Channel2" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 2 )

View file

@ -0,0 +1,34 @@
shader_type canvas_item;
render_mode blend_mix,unshaded;
uniform vec4 effect_color : hint_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform float effect_width : hint_range(0, 0.5) = 0.1;
uniform float effect_offset : hint_range(0, 0.5) = 0;
void fragment() {
vec2 uv = UV;
// Apply offset
if (uv.x < 0.5) {
uv.x -= effect_offset;
} else {
uv.x += effect_offset;
}
if (uv.y < 0.5) {
uv.y -= effect_offset;
} else {
uv.y += effect_offset;
}
uv = clamp(uv, 0, 1);
COLOR = effect_color;
if (uv.x < effect_width) {
COLOR.a *= uv.x / effect_width;
} else if (uv.x > 1.0-effect_width) {
COLOR.a *= ((1.0 - uv.x) / effect_width);
}
if (uv.y < effect_width) {
COLOR.a *= uv.y / effect_width;
} else if (uv.y > 1.0-effect_width) {
COLOR.a *= ((1.0 - uv.y) / effect_width);
}
}

View file

@ -0,0 +1,36 @@
shader_type canvas_item;
render_mode blend_mix,unshaded;
uniform vec4 effect_color : hint_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform float effect_strength : hint_range(0, 1) = 0.5;
uniform float effect_offset : hint_range(-0.7, 0.7) = 0;
uniform float rotation : hint_range(-90, 90) = 0;
uniform float width : hint_range(0, 0.5) = 0.2;
uniform float softness : hint_range(0, 1) = 0.5;
void fragment() {
float a, b, c, powsum;
float rad = radians(rotation);
if (rotation < 45f && rotation > -45f) {
a = 1.0;
b = tan(rad);
c = -0.5f - 0.5f * b - effect_offset / cos(rad);
} else {
b =1.0;
a = 1.0 / tan(rad);
c = -0.5 - 0.5f * a - effect_offset / sin(rad);
}
float d = abs(a * UV.x + b * UV.y + c) / sqrt(a * a + b * b);
float edge = (1.0 - softness) * width;
if ( d < edge) {
vec4 color = texture(TEXTURE, UV);
COLOR = effect_color * effect_strength + color;
COLOR.a = color.a;
} else if (d > width) {
COLOR = texture(TEXTURE, UV);
} else {
vec4 color = texture(TEXTURE, UV);
COLOR = (width - d) / (width - edge) * effect_color * effect_strength + color;
COLOR.a = color.a;
}
}

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/low_woosh.wav-f25971f094bce7f745ac9ca56d1a164c.sample"
[deps]
source_file="res://UIAssets/Sounds/low_woosh.wav"
dest_files=[ "res://.import/low_woosh.wav-f25971f094bce7f745ac9ca56d1a164c.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0

BIN
UIAssets/mane6start.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/mane6start.png-71c53d560a5118cb5ac4a8c98b71f0b8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UIAssets/mane6start.png"
dest_files=[ "res://.import/mane6start.png-71c53d560a5118cb5ac4a8c98b71f0b8.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
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

View file

@ -5,9 +5,9 @@ platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
include_filter="*.json"
exclude_filter=""
export_path="C:/VC/mlpcardgame-out/index.html"
export_path="C:/VC/mlpcardgame-out/index-nosfw.html"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
@ -28,7 +28,7 @@ platform="Android"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
include_filter="*.json"
exclude_filter=""
export_path="B:/OneDrive/Documenti/VC/mlpcardgame-html/index.apk"
patch_list=PoolStringArray( )
@ -249,7 +249,7 @@ platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
include_filter="*.json"
exclude_filter=""
export_path="C:/VC/mlpcardgame-out/mcg.x86_64"
patch_list=PoolStringArray( )
@ -274,7 +274,7 @@ platform="Windows Desktop"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
include_filter="*.json"
exclude_filter=""
export_path="C:/VC/mlpcardgame-out/mcg-hp.exe"
patch_list=PoolStringArray( )

View file

@ -53,10 +53,11 @@ config/icon="res://icon.png"
[autoload]
CardData="*res://Scenes/Global/CardData.tscn"
Remote="*res://Scenes/Global/Remote.tscn"
Mods="*res://Scenes/Global/Mods.tscn"
Loader="*res://Scenes/Global/Loader.tscn"
BGM="*res://Scenes/BGMusic.tscn"
Mods="*res://Scenes/Global/Mods.tscn"
[debug]