added some new icons; refined player scene; added teams; widened resolution

This commit is contained in:
Adam Burns 2026-02-11 08:09:14 -05:00
parent 4eed162ccd
commit c3bba9501a
20 changed files with 367 additions and 30 deletions

43
assets/icons/court.svg Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="16.043962"
height="16.043962"
viewBox="0 0 16.043962 16.043962"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g
id="layer1"
transform="translate(0.0219813,0.0219813)">
<rect
style="fill:#ead4aa;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-dasharray:none;stroke-opacity:1"
id="rect3"
width="15.043962"
height="15.043962"
x="0.4780187"
y="0.4780187" />
<path
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.990255;stroke-dasharray:none;stroke-opacity:1"
d="m 2.4480716,0.73583688 0.036072,7.94922162 c 0,0 -0.5050136,4.8401925 5.4830052,4.8401925 5.9880182,0 5.5551502,-4.946182 5.5551502,-4.946182 l -0.03607,-7.87856199"
id="path5" />
<ellipse
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.833557;stroke-dasharray:none;stroke-opacity:1"
id="path4"
cx="8"
cy="9"
rx="2.5832212"
ry="2.5832214" />
<rect
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-dasharray:none;stroke-opacity:1"
id="rect4"
width="5.0132484"
height="8.0132475"
x="5.4933758"
y="0.49337599" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8vse4cqbr55f"
path="res://.godot/imported/court.svg-870294249b3b9207b540813d3efa57aa.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/icons/court.svg"
dest_files=["res://.godot/imported/court.svg-870294249b3b9207b540813d3efa57aa.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -1,29 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="4.2333331mm"
height="4.2333331mm"
viewBox="0 0 4.2333331 4.2333331"
version="1.1"
id="svg158"
width="16.000031"
height="16"
id="svg1"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="true">
<inkscape:grid
id="grid1"
units="mm"
originx="7.1054274e-15"
originy="0"
spacingx="0.26458333"
spacingy="0.26458334"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="4"
enabled="true"
visible="true" />
<inkscape:page
x="0"
y="0"
width="4.2333331"
height="4.2333331"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1" />
<path
stroke="none"
fill="#464444"
d="m 4.9848516,5.1532817 q 3.04407,2.215143 6.1195104,0.03077 l 3.43635,1.922867 q 0.59626,0.323041 0.76886,0.953742 0.1726,0.6307 -0.1726,1.199869 l -0.10984,0.184595 q -0.32951,0.5691683 -0.97285,0.7383813 -0.67471,0.169212 -1.25528,-0.15383 l -1.93,-1.0921883 0.0471,0.06153 0.25106,0.523019 1.0513,3.7995853 q 0.1726,0.630701 -0.18829,1.215252 -0.32952,0.553786 -0.97285,0.738381 l -0.20398,0.04615 q -0.65903,0.169212 -1.2552904,-0.15383 -0.58057,-0.338424 -0.75317,-0.969124 l -0.56488,-2.061314 h -0.56487 l -0.56488,2.061314 q -0.1726,0.6307 -0.76886,0.969124 -0.58057,0.323042 -1.22391,0.15383 l -0.20398,-0.04615 q -0.67472,-0.184595 -1.00423,-0.738381 -0.32951,-0.584551 -0.15691,-1.215252 l 1.0513,-3.7995853 q 0.0785,-0.292275 0.25106,-0.523019 l 0.0471,-0.06153 -1.94569,1.0921883 q -0.59626,0.323042 -1.23959,0.15383 -0.65903,-0.169213 -1.00422999,-0.7383813 l -0.10984,-0.184595 q -0.32951,-0.569169 -0.15691,-1.199869 0.1726,-0.630701 0.76885999,-0.953742 l 3.5148,-1.953633 h 0.0157 m 0.58057,-0.384573 q -0.39228,-0.630701 -0.39228,-1.399847 0,-1.138337 0.83163,-1.93825 0.83163,-0.81529598 1.99276,-0.81529598 1.17683,0 1.99277,0.81529598 0.8316304,0.799913 0.8316304,1.93825 0,0.769146 -0.37659,1.399847 -2.4478104,1.52291 -4.8799204,0"
id="path118"
style="stroke-width:0.310724" />
<path
stroke="none"
fill="#333232"
d="m 5.5654216,4.7687087 q 2.43211,1.52291 4.8799204,0 l 0.59626,0.384573 0.0628,0.03077 q -3.0754404,2.184377 -6.1195104,-0.03077 l 0.58057,-0.384573"
id="path119"
style="stroke-width:0.310724" />
<path
stroke="none"
fill="#191919"
d="m 1.1562316,6.5685117 3.5148,-1.953633 0.0628,-0.03077 0.0314,-0.01538 q -0.21968,-0.569169 -0.21968,-1.199869 0,-1.399847 1.01992,-2.36897198 1.00423,-0.9998909992969 2.43211,-0.9998909992969 1.42789,0 2.4321204,0.9998909992969 h 0.0157 q 1.00423,0.98450798 1.00423,2.36897198 0,0.6307 -0.20399,1.184486 l 0.12553,0.07691 -0.0157,-0.01538 3.49911,1.953633 q 0.81593,0.446105 1.06699,1.338315 0.23537,0.876828 -0.23537,1.67674 v -0.01538 l -0.10983,0.184596 q -0.45504,0.7845293 -1.34943,1.0306563 h -0.0157 q -0.92577,0.230744 -1.71032,-0.215361 h -0.0157 l -0.45504,-0.26151 0.80024,2.861226 q 0.23537,0.876827 -0.26675,1.692123 l 0.0157,-0.01538 q -0.45504,0.769147 -1.34943,1.030656 h -0.0314 l -0.20398,0.04615 h 0.0157 q -0.89439,0.230744 -1.7103304,-0.215361 h -0.0157 q -0.80024,-0.476871 -1.03561,-1.338315 l -0.25106,-0.89221 -0.23536,0.89221 q -0.23537,0.861444 -1.06699,1.338315 -0.80025,0.446105 -1.67895,0.215361 l -0.20398,-0.04615 h -0.0314 q -0.92578,-0.261509 -1.36512,-1.030656 h -0.0157 q -0.45504,-0.815296 -0.20398,-1.67674 l 0.78455,-2.861226 -0.47073,0.26151 q -0.83162,0.446105 -1.71032,0.215361 Q 0.88949161,10.537312 0.41876161,9.7681647 v -0.01538 l -0.10983,-0.184596 h -0.0157 q -0.45504,-0.799912 -0.20398,-1.661357 0.23537,-0.89221 1.06698999,-1.338315 m 3.82862,-1.41523 h -0.0157 l -3.5148,1.953633 q -0.59625999,0.323041 -0.76885999,0.953742 -0.1726,0.6307 0.15691,1.199869 l 0.10984,0.184595 q 0.34519999,0.5691683 1.00422999,0.7383813 0.64333,0.169212 1.23959,-0.15383 l 1.94569,-1.0921883 -0.0471,0.06153 q -0.1726,0.230744 -0.25106,0.523019 l -1.0513,3.7995853 q -0.1726,0.630701 0.15691,1.215252 0.32951,0.553786 1.00423,0.738381 l 0.20398,0.04615 q 0.64334,0.169212 1.22391,-0.15383 0.59626,-0.338424 0.76886,-0.969124 l 0.56488,-2.061314 h 0.56487 l 0.56488,2.061314 q 0.1726,0.6307 0.75317,0.969124 0.5962604,0.323042 1.2552904,0.15383 l 0.20398,-0.04615 q 0.64333,-0.184595 0.97285,-0.738381 0.36089,-0.584551 0.18829,-1.215252 l -1.0513,-3.7995853 -0.25106,-0.523019 -0.0471,-0.06153 1.93,1.0921883 q 0.58057,0.323042 1.25528,0.15383 0.64334,-0.169213 0.97285,-0.7383813 l 0.10984,-0.184595 q 0.3452,-0.569169 0.1726,-1.199869 -0.1726,-0.630701 -0.76886,-0.953742 l -3.43635,-1.922867 -0.0628,-0.03077 -0.59626,-0.384573 q 0.37659,-0.630701 0.37659,-1.399847 0,-1.138337 -0.8316304,-1.93825 -0.81594,-0.81529598 -1.99277,-0.81529598 -1.16113,0 -1.99276,0.81529598 -0.83163,0.799913 -0.83163,1.93825 0,0.769146 0.39228,1.399847 l -0.58057,0.384573"
id="path120"
style="stroke-width:0.310724" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g1">
<rect
style="fill:#f9f9f9;fill-opacity:0;stroke-width:0.088569"
id="rect1"
width="4.2333331"
height="4.2333331"
x="-7.1054274e-15"
y="0" />
<path
stroke="none"
fill="#73cd4b"
d="m 1.7904129,1.6361291 q -0.04961,-0.0331 -0.09261,-0.0761 -0.175286,-0.17528 -0.175286,-0.42333 0,-0.24804998 0.175286,-0.42332998 0.175287,-0.17859 0.426641,-0.17859 0.251354,0 0.429948,0.17859 0.178594,0.17529 0.178594,0.42332998 0,0.24805 -0.178594,0.42333 l -0.07607,0.0661 -0.01323,0.01 q -0.350573,0.0926 -0.674687,0 m 0.773906,0.1356 0.12237,0.22159 q 0.228203,0.51263 0.23151,1.23692 v 0.007 q 0,0.19513 -0.23151,0.33403 -0.231511,0.13891 -0.56224,0.13891 -0.330729,0 -0.562239,-0.13891 -0.231511,-0.1389 -0.231511,-0.33403 v -0.007 q 0.0033,-0.72429 0.231511,-1.23692 0.06284,-0.13891 0.132291,-0.23482 0.420026,0.23482 0.869818,0.0132"
id="path106"
style="stroke-width:0.0661455" />
<path
stroke="none"
fill="#70bd4e"
d="m 2.5643189,1.7717291 q -0.449792,0.22159 -0.869818,-0.0132 l 0.09591,-0.12237 q 0.324114,0.0926 0.674687,0 l -0.0066,0.004 0.105833,0.13229"
id="path107"
style="stroke-width:0.0661455" />
<path
stroke="none"
fill="#4d8534"
d="m 2.5643189,1.7717291 -0.105833,-0.13229 0.0066,-0.004 0.01323,-0.01 0.07607,-0.0661 q 0.178594,-0.17529 0.178594,-0.42333 0,-0.24804998 -0.178594,-0.42333998 -0.178594,-0.17859 -0.429948,-0.17859 -0.251354,0 -0.42664,0.17859 -0.175287,0.17529 -0.175287,0.42333998 0,0.24804 0.175287,0.42333 0.04299,0.043 0.0926,0.0761 l -0.09591,0.12237 q -0.06945,0.0959 -0.132291,0.23482 -0.228203,0.51263 -0.231511,1.23692 v 0.007 q 0,0.19513 0.231511,0.33404 0.23151,0.1389 0.562239,0.1389 0.330729,0 0.56224,-0.1389 0.23151,-0.13891 0.23151,-0.33404 v -0.007 q -0.0033,-0.72429 -0.23151,-1.23692 l -0.12237,-0.22159 m 0.300964,-0.635 q 0,0.30427 -0.218282,0.51924 l 0.02976,0.043 h -0.0033 l 0.135599,0.23813 v 0.004 q 0.238125,0.53247 0.241432,1.28984 v 0.007 q 0.0099,0.26459 -0.294348,0.4498 -0.261277,0.15544 -0.631693,0.15544 -0.370417,0 -0.628386,-0.15544 -0.307578,-0.18521 -0.297656,-0.4498 v -0.007 q 0.0033,-0.75737 0.24474,-1.28984 0.06615,-0.15214 0.142213,-0.25467 l 0.0033,-0.004 0.01654,-0.0264 q -0.214974,-0.21497 -0.214974,-0.51924 0,-0.30426998 0.214974,-0.51593998 0.211667,-0.21828 0.519245,-0.21828 0.307578,0 0.525859,0.21828 h -0.0033 q 0.218282,0.21167 0.218282,0.51593998"
id="path108"
style="stroke-width:0.0661455" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dmjg5fnkoonco"
uid="uid://dgph2rb7qswca"
path="res://.godot/imported/player.svg-a2bcd8e0436a01647bdc15db60a237aa.ctex"
metadata={
"vram_texture": false

BIN
assets/players/red_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://w10nqq5ng8n5"
path="res://.godot/imported/red_big.png-14b67fd2781cab4f920bbaff9afeafde.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/players/red_big.png"
dest_files=["res://.godot/imported/red_big.png-14b67fd2781cab4f920bbaff9afeafde.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cn2xfwvejclvo"
path="res://.godot/imported/red_guard.png-7c53a2c883f8413f0110cd68e3b728ba.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/players/red_guard.png"
dest_files=["res://.godot/imported/red_guard.png-7c53a2c883f8413f0110cd68e3b728ba.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -4,22 +4,101 @@
[ext_resource type="PackedScene" uid="uid://cxbu51aedxg3c" path="res://court.tscn" id="1_e2o6t"]
[ext_resource type="PackedScene" uid="uid://boqs7k6ia532h" path="res://player.tscn" id="2_feb5d"]
[ext_resource type="Texture2D" uid="uid://cdisx65vqrn21" path="res://assets/players/red_wing.png" id="3_fc0e3"]
[ext_resource type="Script" uid="uid://bbey5ttwv5utd" path="res://scripts/player_attributes.gd" id="4_7jktm"]
[ext_resource type="Script" uid="uid://vb7lr6djyhnv" path="res://scripts/team.gd" id="3_hve3p"]
[ext_resource type="Script" uid="uid://bbey5ttwv5utd" path="res://scripts/custom resources/player_attributes.gd" id="4_7jktm"]
[ext_resource type="Texture2D" uid="uid://46vgqxp2imyw" path="res://assets/players/blue_guard.png" id="4_j5wjh"]
[ext_resource type="Script" uid="uid://c7dxj0ifl687s" path="res://scripts/custom resources/team_attributes.gd" id="4_mfdv2"]
[ext_resource type="PackedScene" uid="uid://cbqaj6trvqat0" path="res://ball.tscn" id="6_ryrav"]
[ext_resource type="Texture2D" uid="uid://df7cknvvngtij" path="res://assets/players/blue_big.png" id="6_vef74"]
[ext_resource type="Texture2D" uid="uid://dl54l4wvub6ro" path="res://assets/players/blue_wing.png" id="7_hve3p"]
[ext_resource type="PackedScene" uid="uid://cfq463kejcp2m" path="res://team.tscn" id="11_mfdv2"]
[ext_resource type="Texture2D" uid="uid://cn2xfwvejclvo" path="res://assets/players/red_guard.png" id="12_iotsf"]
[ext_resource type="Texture2D" uid="uid://w10nqq5ng8n5" path="res://assets/players/red_big.png" id="14_215e1"]
[sub_resource type="Resource" id="Resource_lc2xo"]
script = ExtResource("4_mfdv2")
team_name = "Blue Devils"
team_color = Color(0, 0, 1, 1)
metadata/_custom_type_script = "uid://c7dxj0ifl687s"
[sub_resource type="Resource" id="Resource_ryrav"]
script = ExtResource("4_7jktm")
player_name = "Kirt"
player_texture = ExtResource("4_j5wjh")
metadata/_custom_type_script = "uid://bbey5ttwv5utd"
[sub_resource type="Resource" id="Resource_mfdv2"]
script = ExtResource("4_7jktm")
player_name = "Greg"
player_position = 1
player_texture = ExtResource("7_hve3p")
metadata/_custom_type_script = "uid://bbey5ttwv5utd"
[sub_resource type="Resource" id="Resource_iotsf"]
script = ExtResource("4_7jktm")
player_name = "Cheryl"
player_position = 2
player_texture = ExtResource("6_vef74")
metadata/_custom_type_script = "uid://bbey5ttwv5utd"
[sub_resource type="Resource" id="Resource_215e1"]
script = ExtResource("4_7jktm")
player_name = "Stevie"
player_texture = ExtResource("12_iotsf")
metadata/_custom_type_script = "uid://bbey5ttwv5utd"
[sub_resource type="Resource" id="Resource_7sc4i"]
script = ExtResource("4_7jktm")
player_name = "Dave"
player_position = 1
player_texture = ExtResource("3_fc0e3")
metadata/_custom_type_script = "uid://bbey5ttwv5utd"
[sub_resource type="Resource" id="Resource_80cx4"]
script = ExtResource("4_7jktm")
player_name = "Brendan"
player_position = 2
player_texture = ExtResource("14_215e1")
metadata/_custom_type_script = "uid://bbey5ttwv5utd"
[node name="Game" type="Node2D" unique_id=980666470]
script = ExtResource("1_7jktm")
[node name="Court" parent="." unique_id=1870443472 instance=ExtResource("1_e2o6t")]
position = Vector2(420, 0)
[node name="Player" parent="." unique_id=1267043713 instance=ExtResource("2_feb5d")]
[node name="BlueTeam" type="Node2D" parent="." unique_id=1262034555]
position = Vector2(420, 0)
script = ExtResource("3_hve3p")
attributes = SubResource("Resource_lc2xo")
metadata/_custom_type_script = "uid://vb7lr6djyhnv"
[node name="Blue1" parent="BlueTeam" unique_id=1267043713 instance=ExtResource("2_feb5d")]
position = Vector2(548, 648)
attributes = SubResource("Resource_ryrav")
[node name="Blue2" parent="BlueTeam" unique_id=1850933619 instance=ExtResource("2_feb5d")]
position = Vector2(278, 562)
attributes = SubResource("Resource_mfdv2")
[node name="Blue3" parent="BlueTeam" unique_id=75794271 instance=ExtResource("2_feb5d")]
position = Vector2(824, 558)
attributes = SubResource("Resource_iotsf")
[node name="RedTeam" parent="." unique_id=1449767365 instance=ExtResource("11_mfdv2")]
position = Vector2(420, 0)
[node name="Red1" parent="RedTeam" unique_id=1614241571 instance=ExtResource("2_feb5d")]
position = Vector2(547, 565)
attributes = SubResource("Resource_215e1")
[node name="Red2" parent="RedTeam" unique_id=812999974 instance=ExtResource("2_feb5d")]
position = Vector2(369, 461)
attributes = SubResource("Resource_7sc4i")
[node name="Red3" parent="RedTeam" unique_id=142493116 instance=ExtResource("2_feb5d")]
position = Vector2(700, 416)
attributes = SubResource("Resource_80cx4")
[node name="Ball" parent="." unique_id=1245529605 instance=ExtResource("6_ryrav")]
position = Vector2(559, 656)
position = Vector2(420, 656)

View File

@ -12,3 +12,18 @@ texture = ExtResource("1_4flbx")
[node name="PlayerNav" type="NavigationAgent2D" parent="." unique_id=1205813043]
avoidance_enabled = true
debug_enabled = true
[node name="PlayerNameLabel" type="Label" parent="." unique_id=1663612244]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -48.0
offset_top = 24.0
offset_right = 47.0
offset_bottom = 47.0
grow_horizontal = 2
grow_vertical = 0
text = "PlayerName"
horizontal_alignment = 1

View File

@ -17,7 +17,7 @@ config/icon="res://icon.svg"
[display]
window/size/viewport_width=1080
window/size/viewport_width=1920
window/size/viewport_height=1080
[physics]

View File

@ -1,2 +1,3 @@
@icon("res://assets/icons/court.svg")
class_name Court
extends Node2D

View File

@ -5,14 +5,14 @@ extends Resource
@export var player_name: String
@export_range(0.0, 99.0, 1.0, "prefer_slider") var player_number: int
@export var player_position: PlayerPosition
@export_category("Abilities")
@export var speed: float
@export_category("Texture")
@export var player_texture: Texture2D
@export_category("Abilities")
@export var speed: float
## The court positions available
enum PlayerPosition {
Guard,
Wing,
Big,
Wing
}

View File

@ -0,0 +1,5 @@
class_name TeamAttributes
extends Resource
@export var team_name: String
@export_color_no_alpha var team_color: Color

View File

@ -0,0 +1 @@
uid://c7dxj0ifl687s

View File

@ -1,4 +1,5 @@
@icon("res://assets/icons/player.svg")
@tool
class_name Player
extends Node2D
@ -6,9 +7,13 @@ extends Node2D
@export var attributes: PlayerAttributes ## The attributes resource that defines the player's abilities, vitals etc.
## 'onready' variables
@onready var player_name_label: Label = $PlayerNameLabel
@onready var player_nav: NavigationAgent2D = $PlayerNav
@onready var player_sprite: Sprite2D = $PlayerSprite
func _ready() -> void:
if attributes:
player_sprite.texture = attributes.player_texture
if attributes.player_name:
player_name_label.text = attributes.player_name
if attributes.player_texture:
player_sprite.texture = attributes.player_texture

4
scripts/team.gd Normal file
View File

@ -0,0 +1,4 @@
class_name Team
extends Node2D
@export var attributes: TeamAttributes

1
scripts/team.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://vb7lr6djyhnv

6
team.tscn Normal file
View File

@ -0,0 +1,6 @@
[gd_scene format=3 uid="uid://cfq463kejcp2m"]
[ext_resource type="Script" uid="uid://vb7lr6djyhnv" path="res://scripts/team.gd" id="1_hkunw"]
[node name="Team" type="Node2D" unique_id=1449767365]
script = ExtResource("1_hkunw")