added table, new card back texture; adjusted camera angle, card scale
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,37 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://dj1wye7o27vil"
|
||||||
|
path="res://.godot/imported/table.glb-b76c89928fa0b392c4b8b9edb34d536f.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/table.glb"
|
||||||
|
dest_files=["res://.godot/imported/table.glb-b76c89928fa0b392c4b8b9edb34d536f.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
gltf/naming_version=1
|
||||||
|
gltf/embedded_image_handling=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 590 KiB |
@@ -0,0 +1,38 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dqbp4ak87m6aj"
|
||||||
|
path.s3tc="res://.godot/imported/table_wood.jpg-17623750d4fd908c8ada78f7e9dbf884.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
generator_parameters={
|
||||||
|
"md5": "20455f34ed3e232ea90fab7f36b7388a"
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/table_wood.jpg"
|
||||||
|
dest_files=["res://.godot/imported/table_wood.jpg-17623750d4fd908c8ada78f7e9dbf884.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
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=0
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
@export var full_deck: Dictionary[int, Card]
|
@export var full_deck: Dictionary[int, Card]
|
||||||
@export var card_textures: Dictionary[int, Texture]
|
|
||||||
@export var card_fallback_texture: Texture
|
@export var card_fallback_texture: Texture
|
||||||
|
|
||||||
enum CardStyle {
|
enum CardStyle {
|
||||||
@@ -45,6 +44,8 @@ func _get_card_name(card_id: int) -> String:
|
|||||||
var color: String
|
var color: String
|
||||||
var suffix: String
|
var suffix: String
|
||||||
|
|
||||||
|
print("looking up card with id " + str(card_id))
|
||||||
|
|
||||||
if card_id < 13:
|
if card_id < 13:
|
||||||
color = "blue"
|
color = "blue"
|
||||||
elif card_id < 26:
|
elif card_id < 26:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ func move_to(new_x_position: float) -> void:
|
|||||||
_get_new_tween().tween_property(self, "position:x", new_x_position, move_duration)
|
_get_new_tween().tween_property(self, "position:x", new_x_position, move_duration)
|
||||||
|
|
||||||
func select() -> void:
|
func select() -> void:
|
||||||
_get_new_tween().tween_property(self, "position:y", 0.36, move_duration)
|
_get_new_tween().tween_property(self, "position:y", 0.13, move_duration)
|
||||||
|
|
||||||
func unselect() -> void:
|
func unselect() -> void:
|
||||||
_get_new_tween().tween_property(self, "position:y", 0.0, move_duration)
|
_get_new_tween().tween_property(self, "position:y", 0.0, move_duration)
|
||||||
|
|||||||
Binary file not shown.
@@ -3,7 +3,7 @@
|
|||||||
[ext_resource type="Script" uid="uid://c2odugkbbppxn" path="res://cards/playing_card.gd" id="1_t6o5d"]
|
[ext_resource type="Script" uid="uid://c2odugkbbppxn" path="res://cards/playing_card.gd" id="1_t6o5d"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dxiv47be5dsll" path="res://cards/playing_card.glb" id="2_enav7"]
|
[ext_resource type="PackedScene" uid="uid://dxiv47be5dsll" path="res://cards/playing_card.glb" id="2_enav7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://i0wpcxpk7g2c" path="res://cards/textures/front_test.webp" id="3_jeoeb"]
|
[ext_resource type="Texture2D" uid="uid://i0wpcxpk7g2c" path="res://cards/textures/front_test.webp" id="3_jeoeb"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cih4y1hskimrs" path="res://cards/textures/back_test.webp" id="4_exvuq"]
|
[ext_resource type="Texture2D" uid="uid://rdmwhsujk7c0" path="res://cards/textures/back_temp.webp" id="4_t6o5d"]
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nwj5s"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nwj5s"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
@@ -12,13 +12,12 @@ resource_local_to_scene = true
|
|||||||
albedo_color = Color(0, 0, 0, 1)
|
albedo_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_auvip"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_auvip"]
|
||||||
albedo_texture = ExtResource("4_exvuq")
|
albedo_texture = ExtResource("4_t6o5d")
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_t6o5d"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_t6o5d"]
|
||||||
size = Vector3(2.38, 3.7, 0.05)
|
size = Vector3(0.275146, 0.427734, 0.0175781)
|
||||||
|
|
||||||
[node name="PlayingCard" type="Area3D" node_paths=PackedStringArray("card_mesh")]
|
[node name="PlayingCard" type="Area3D" node_paths=PackedStringArray("card_mesh")]
|
||||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
script = ExtResource("1_t6o5d")
|
script = ExtResource("1_t6o5d")
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://rdmwhsujk7c0"
|
||||||
|
path.s3tc="res://.godot/imported/back_temp.webp-8df29acfa79ff82f0ef6131269144180.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cards/textures/back_temp.webp"
|
||||||
|
dest_files=["res://.godot/imported/back_temp.webp-8df29acfa79ff82f0ef6131269144180.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
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=0
|
||||||
+9
-11
@@ -1,13 +1,11 @@
|
|||||||
class_name PlayerHand
|
class_name PlayerHand
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
@export var card_width: float = 2.35
|
|
||||||
|
|
||||||
## Distance cards will be apart when there is a small amount of them
|
## Distance cards will be apart when there is a small amount of them
|
||||||
@export var card_distance_max: float = 0.8
|
var card_distance_max: float = 0.18
|
||||||
|
|
||||||
## Distance cards will be apart when there is a large amount of them
|
## Distance cards will be apart when there is a large amount of them
|
||||||
@export var card_distance_min: float = 0.32
|
var card_distance_min: float = 0.09
|
||||||
|
|
||||||
## How many test cards to add
|
## How many test cards to add
|
||||||
@export_range(0, 20) var test_card_count: int = 0
|
@export_range(0, 20) var test_card_count: int = 0
|
||||||
@@ -19,13 +17,13 @@ var _selected_card: PlayingCard = null
|
|||||||
signal card_selected(card_id: int)
|
signal card_selected(card_id: int)
|
||||||
signal card_played(card_id: int)
|
signal card_played(card_id: int)
|
||||||
|
|
||||||
#func _ready() -> void:
|
func _ready() -> void:
|
||||||
#_arrange_cards()
|
_arrange_cards()
|
||||||
#var test_array: Array[int]
|
var test_array: Array[int]
|
||||||
#for i in range(20):
|
for i in range(20):
|
||||||
#test_array.append(randi_range(0, 59))
|
test_array.append(randi_range(0, 59))
|
||||||
#
|
|
||||||
#add_cards(test_array)
|
add_cards(test_array, "")
|
||||||
|
|
||||||
func add_card(card: PlayingCard) -> void:
|
func add_card(card: PlayingCard) -> void:
|
||||||
self.add_child(card)
|
self.add_child(card)
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://gqrdpjslr4np"]
|
[gd_scene load_steps=9 format=3 uid="uid://gqrdpjslr4np"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://p5gvnyhjqe6o" path="res://components/web_client_tcp.gd" id="1_feb5d"]
|
[ext_resource type="Script" uid="uid://p5gvnyhjqe6o" path="res://components/web_client_tcp.gd" id="1_feb5d"]
|
||||||
[ext_resource type="Script" uid="uid://c0cqkatyo4uj1" path="res://components/client_interface.gd" id="2_e2o6t"]
|
[ext_resource type="Script" uid="uid://c0cqkatyo4uj1" path="res://components/client_interface.gd" id="2_e2o6t"]
|
||||||
[ext_resource type="Script" uid="uid://utt8atbh7b2a" path="res://game_client.gd" id="3_feb5d"]
|
[ext_resource type="Script" uid="uid://utt8atbh7b2a" path="res://game_client.gd" id="3_feb5d"]
|
||||||
[ext_resource type="Script" uid="uid://bipfa366flrfa" path="res://environment_manager.gd" id="4_7jktm"]
|
[ext_resource type="Script" uid="uid://bipfa366flrfa" path="res://environment_manager.gd" id="4_7jktm"]
|
||||||
[ext_resource type="PackedScene" uid="uid://jlovgr2iojrg" path="res://elements/player_hand.tscn" id="4_fc0e3"]
|
[ext_resource type="PackedScene" uid="uid://jlovgr2iojrg" path="res://elements/player_hand.tscn" id="4_fc0e3"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dj1wye7o27vil" path="res://assets/table.glb" id="7_eow3j"]
|
||||||
|
|
||||||
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
|
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
|
||||||
font_names = PackedStringArray("IBM Plex Mono")
|
font_names = PackedStringArray("IBM Plex Mono")
|
||||||
@@ -201,7 +202,8 @@ own_player_hand = NodePath("PlayerHand")
|
|||||||
player_hand_scene = ExtResource("4_fc0e3")
|
player_hand_scene = ExtResource("4_fc0e3")
|
||||||
|
|
||||||
[node name="Camera3D" type="Camera3D" parent="EnvironmentManager"]
|
[node name="Camera3D" type="Camera3D" parent="EnvironmentManager"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.997882, 0.0650548, 0, -0.0650548, 0.997882, 0, 0.171315, 1.65638)
|
transform = Transform3D(1, 0, 0, 0, 0.93358, 0.358368, 0, -0.358368, 0.93358, 0, 1.298, 3.663)
|
||||||
|
fov = 69.0
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="EnvironmentManager"]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="EnvironmentManager"]
|
||||||
transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0.197668, -0.572361, 0.795821, 2.41581, 2.80426, 0)
|
transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0.197668, -0.572361, 0.795821, 2.41581, 2.80426, 0)
|
||||||
@@ -210,7 +212,9 @@ transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0
|
|||||||
environment = SubResource("Environment_fc0e3")
|
environment = SubResource("Environment_fc0e3")
|
||||||
|
|
||||||
[node name="PlayerHand" parent="EnvironmentManager" instance=ExtResource("4_fc0e3")]
|
[node name="PlayerHand" parent="EnvironmentManager" instance=ExtResource("4_fc0e3")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.91793)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 2.6)
|
||||||
|
|
||||||
|
[node name="Table" parent="EnvironmentManager" instance=ExtResource("7_eow3j")]
|
||||||
|
|
||||||
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_client_joined_lobby"]
|
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_client_joined_lobby"]
|
||||||
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_client_joined_lobby"]
|
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_client_joined_lobby"]
|
||||||
|
|||||||
Reference in New Issue
Block a user