diff --git a/Assets/Textures/assault_icon.png b/Assets/Textures/assault_icon.png new file mode 100644 index 0000000..55c6e15 Binary files /dev/null and b/Assets/Textures/assault_icon.png differ diff --git a/Assets/Textures/assault_icon.png.import b/Assets/Textures/assault_icon.png.import new file mode 100644 index 0000000..c0d4762 --- /dev/null +++ b/Assets/Textures/assault_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpcyxdpog3w85" +path="res://.godot/imported/assault_icon.png-104850883b7010dc9beab69e5d7c5d6d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Textures/assault_icon.png" +dest_files=["res://.godot/imported/assault_icon.png-104850883b7010dc9beab69e5d7c5d6d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/Assets/Textures/damage_icon.png b/Assets/Textures/damage_icon.png new file mode 100644 index 0000000..c8143df Binary files /dev/null and b/Assets/Textures/damage_icon.png differ diff --git a/Assets/Textures/damage_icon.png.import b/Assets/Textures/damage_icon.png.import new file mode 100644 index 0000000..594b1fb --- /dev/null +++ b/Assets/Textures/damage_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b165eh481oodf" +path="res://.godot/imported/damage_icon.png-841fec7a42094ebc8d165014acbb76de.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Textures/damage_icon.png" +dest_files=["res://.godot/imported/damage_icon.png-841fec7a42094ebc8d165014acbb76de.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/Assets/Textures/flight_icon.png b/Assets/Textures/flight_icon.png new file mode 100644 index 0000000..81d83e0 Binary files /dev/null and b/Assets/Textures/flight_icon.png differ diff --git a/Assets/Textures/flight_icon.png.import b/Assets/Textures/flight_icon.png.import new file mode 100644 index 0000000..48ee8b0 --- /dev/null +++ b/Assets/Textures/flight_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b1op181s87mu" +path="res://.godot/imported/flight_icon.png-edcd48009886bb4762ba96810d291cf4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Textures/flight_icon.png" +dest_files=["res://.godot/imported/flight_icon.png-edcd48009886bb4762ba96810d291cf4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/Assets/Textures/rocket_launcher_icon.png b/Assets/Textures/rocket_launcher_icon.png new file mode 100644 index 0000000..07bd123 Binary files /dev/null and b/Assets/Textures/rocket_launcher_icon.png differ diff --git a/Assets/Textures/rocket_launcher_icon.png.import b/Assets/Textures/rocket_launcher_icon.png.import new file mode 100644 index 0000000..764a5b8 --- /dev/null +++ b/Assets/Textures/rocket_launcher_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bfhliqv803dku" +path="res://.godot/imported/rocket_launcher_icon.png-e1b3eb9488c4f56100d84e4b7b0bda92.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Textures/rocket_launcher_icon.png" +dest_files=["res://.godot/imported/rocket_launcher_icon.png-e1b3eb9488c4f56100d84e4b7b0bda92.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/Assets/Textures/utility_icon.png b/Assets/Textures/utility_icon.png new file mode 100644 index 0000000..2599d10 Binary files /dev/null and b/Assets/Textures/utility_icon.png differ diff --git a/Assets/Textures/utility_icon.png.import b/Assets/Textures/utility_icon.png.import new file mode 100644 index 0000000..b90421b --- /dev/null +++ b/Assets/Textures/utility_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://yf3gpagilt8n" +path="res://.godot/imported/utility_icon.png-5890d4351db22cf6722b91511b458919.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Textures/utility_icon.png" +dest_files=["res://.godot/imported/utility_icon.png-5890d4351db22cf6722b91511b458919.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/Cards/assault.tres b/Cards/assault.tres index 0a10aae..5715c1d 100644 --- a/Cards/assault.tres +++ b/Cards/assault.tres @@ -1,10 +1,11 @@ -[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://deer0awg4d18o"] +[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://deer0awg4d18o"] +[ext_resource type="Texture2D" uid="uid://bpcyxdpog3w85" path="res://Assets/Textures/assault_icon.png" id="1_us0mt"] [ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_yqa4b"] -[ext_resource type="PackedScene" uid="uid://2eehfcrsednw" path="res://Weapons/Assault/weapon_assault.tscn" id="3_28y3b"] [ext_resource type="Resource" uid="uid://bdmsiw45xxhiv" path="res://Towers/Assault/tower_stats.tres" id="3_ks0jw"] [ext_resource type="PackedScene" uid="uid://chbmp1ap8jc7" path="res://Towers/Assault/tower_assault.tscn" id="4_5nu32"] [ext_resource type="Resource" uid="uid://smctw4ogm4rx" path="res://Weapons/Assault/weapon_stats.tres" id="4_est7t"] +[ext_resource type="PackedScene" uid="uid://bn3t6sjupdxgi" path="res://Weapons/Assault/rifle.tscn" id="4_m52ff"] [resource] script = ExtResource("1_yqa4b") @@ -12,7 +13,9 @@ duration = 5 rarity = 0 faction = 1 turret_scene = ExtResource("4_5nu32") -weapon_scene = ExtResource("3_28y3b") +weapon_scene = ExtResource("4_m52ff") weapon_stats = ExtResource("4_est7t") tower_stats = ExtResource("3_ks0jw") +tags = Array[int]([0]) display_name = "Assault" +icon = ExtResource("1_us0mt") diff --git a/Cards/rocket_launcher.tres b/Cards/rocket_launcher.tres index 968be0f..7e93594 100644 --- a/Cards/rocket_launcher.tres +++ b/Cards/rocket_launcher.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://b37r54q84vqoi"] +[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://b37r54q84vqoi"] [ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_ly0o5"] +[ext_resource type="Texture2D" uid="uid://bfhliqv803dku" path="res://Assets/Textures/rocket_launcher_icon.png" id="1_qabk3"] [ext_resource type="Resource" uid="uid://c65rq455ma8f6" path="res://Towers/RocketLauncher/tower_stats.tres" id="3_06my6"] [ext_resource type="PackedScene" uid="uid://clunpgm4plkar" path="res://Towers/RocketLauncher/rocket_tower.tscn" id="3_73c50"] [ext_resource type="PackedScene" uid="uid://bdp7icdejayvr" path="res://Weapons/RocketLauncher/weapon_rocket_launcher.tscn" id="3_qo5gv"] @@ -15,4 +16,6 @@ turret_scene = ExtResource("3_73c50") weapon_scene = ExtResource("3_qo5gv") weapon_stats = ExtResource("4_cmvfg") tower_stats = ExtResource("3_06my6") +tags = Array[int]([0, 2]) display_name = "Rocket Launcher" +icon = ExtResource("1_qabk3") diff --git a/Classes/Engineer/class.tres b/Classes/Engineer/class.tres index d40fe45..2f347ed 100644 --- a/Classes/Engineer/class.tres +++ b/Classes/Engineer/class.tres @@ -1,11 +1,9 @@ -[gd_resource type="Resource" script_class="HeroClass" load_steps=11 format=3 uid="uid://b5pc3frhx467q"] +[gd_resource type="Resource" script_class="HeroClass" load_steps=9 format=3 uid="uid://b5pc3frhx467q"] [ext_resource type="PackedScene" uid="uid://dq8v5e11rvyi6" path="res://Classes/Engineer/plan.tscn" id="1_2m5d7"] [ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_t4fvj"] [ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://Cards/assault.tres" id="2_62g46"] -[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://Cards/sniper.tres" id="3_eml7q"] -[ext_resource type="Resource" uid="uid://cvto66tp7rrst" path="res://Cards/gatling.tres" id="4_ovvb2"] -[ext_resource type="Resource" uid="uid://cucdevshmdohf" path="res://Cards/overclock_card.tres" id="5_vqkxt"] +[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://Cards/rocket_launcher.tres" id="4_o2u8f"] [ext_resource type="Texture2D" uid="uid://ctkixdue3o7ec" path="res://Classes/Engineer/red_hand.png" id="6_a8dvt"] [ext_resource type="Script" uid="uid://dcwtg2gev3uia" path="res://Scripts/Resources/hero_class.gd" id="7_ftkad"] [ext_resource type="PackedScene" uid="uid://ciagj1hfn4gou" path="res://Classes/Engineer/podium.tscn" id="7_nyup7"] @@ -16,7 +14,7 @@ script = ExtResource("7_ftkad") hero_name = "Engineer" texture = ExtResource("8_0o0bw") hand_texture = ExtResource("6_a8dvt") -deck = Array[ExtResource("1_t4fvj")]([ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("4_ovvb2"), ExtResource("4_ovvb2"), ExtResource("4_ovvb2"), ExtResource("5_vqkxt"), ExtResource("5_vqkxt"), ExtResource("3_eml7q")]) +deck = Array[ExtResource("1_t4fvj")]([ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("4_o2u8f"), ExtResource("4_o2u8f"), ExtResource("4_o2u8f")]) faction = 1 podium = ExtResource("7_nyup7") card_item = ExtResource("1_2m5d7") diff --git a/Gun Thing.glb b/Gun Thing.glb new file mode 100644 index 0000000..b039fcd Binary files /dev/null and b/Gun Thing.glb differ diff --git a/Gun Thing.glb.import b/Gun Thing.glb.import new file mode 100644 index 0000000..0034bc0 --- /dev/null +++ b/Gun Thing.glb.import @@ -0,0 +1,44 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://ccltaimvldxfu" +path="res://.godot/imported/Gun Thing.glb-346cc6d756ff806bd7662c149c6ed8f0.scn" + +[deps] + +source_file="res://Gun Thing.glb" +dest_files=["res://.godot/imported/Gun Thing.glb-346cc6d756ff806bd7662c149c6ed8f0.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={ +"materials": { +"Material": { +"use_external/enabled": true, +"use_external/path": "uid://bjdi4f801k0xt" +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/PCs/PathEditTool/path_edit_tool.gd b/PCs/PathEditTool/path_edit_tool.gd index 82e8828..39950ed 100644 --- a/PCs/PathEditTool/path_edit_tool.gd +++ b/PCs/PathEditTool/path_edit_tool.gd @@ -98,7 +98,7 @@ func process_looking_at_level() -> void: if tower_preview: delete_tower_preview() point = level.flow_field.get_closest_buildable_point(ray_point) - if level.walls.has(point) or !point.buildable or hero.energy < Data.wall_cost: + if level.walls.has(point) or !point.buildable or hero.energy < Data.wall_cost or !hero.building_mode: wall_preview.set_visible(false) valid_point = false clear_previous_point() @@ -132,14 +132,14 @@ func process_looking_at_tower() -> void: ray_collider.set_color(Color.RED) ray_collider.set_float(0.0) if hero.hand.size > 0 and !ray_collider.has_card: - if ray_collider != last_tower_base or hero.hand.item_at(hero.hand_selected_index) != tower_preview_card: + if ray_collider != last_tower_base or hero.selected_card != tower_preview_card: spawn_tower_preview() func spawn_tower_preview() -> void: delete_tower_preview() last_tower_base = ray_collider - var card: Card = hero.hand.item_at(hero.hand_selected_index) + var card: Card = hero.selected_card tower_preview_card = card tower_preview = card.turret_scene.instantiate() as Tower tower_preview.stats = card.tower_stats @@ -178,21 +178,25 @@ func refund_wall(wall: TowerBase) -> void: func put_card_in_tower_base(tower_base: TowerBase) -> void: - var energy_cost: int = int(hero.hand.item_at(hero.hand_selected_index).rarity) + 1 + if hero.hand.size <= 0: + return + var card: Card = hero.selected_card + var energy_cost: int = int(card.rarity) + 1 + energy_cost *= 2 if hero.energy < energy_cost: return - if hero.hand.size > 0: - if tower_base.has_card: - tower_base.remove_card() - var card: Card = hero.hand.remove_at(hero.hand_selected_index) - hero.card_sprites[hero.hand_selected_index].queue_free() - hero.card_sprites.remove_at(hero.hand_selected_index) - #if !hero.hand.contents.has(card): - hero.decrement_selected() - tower_base.add_card(card, multiplayer.get_unique_id()) - hero.discard_pile.add(card) - hero.place_card_audio.play() - hero.energy -= energy_cost + if tower_base.has_card: + tower_base.remove_card() + hero.hand.remove_at(hero.hand.contents.find(card)) + hero.check_removal() + #hero.card_sprites[hero.hand_selected_index].queue_free() + #hero.card_sprites.remove_at(hero.hand_selected_index) + #if !hero.hand.contents.has(card): + #hero.decrement_selected() + tower_base.add_card(card, multiplayer.get_unique_id()) + hero.discard_pile.add(card) + hero.place_card_audio.play() + hero.energy -= energy_cost func set_progress_percent(value: float) -> void: diff --git a/PCs/PathEditTool/path_edit_tool.tscn b/PCs/PathEditTool/path_edit_tool.tscn index 044c77f..18ffe40 100644 --- a/PCs/PathEditTool/path_edit_tool.tscn +++ b/PCs/PathEditTool/path_edit_tool.tscn @@ -15,6 +15,7 @@ target_position = Vector3(0, 0, -20) collision_mask = 25 [node name="WallPreview" parent="." instance=ExtResource("2_pjtpe")] +visible = false [node name="ProgressBar" type="TextureProgressBar" parent="."] anchors_preset = 8 diff --git a/PCs/hero.gd b/PCs/hero.gd index a77a122..8fe8b37 100644 --- a/PCs/hero.gd +++ b/PCs/hero.gd @@ -9,11 +9,11 @@ signal ready_state_changed(state: bool) @export var left_hand_sprite: Sprite3D @export var left_hand: Node3D @export var right_hand: Node3D -@export var right_hand_animator: AnimationPlayer +#@export var right_hand_animator: AnimationPlayer @export var edit_tool: PathEditTool @export var gauntlet_sprite: Sprite3D @export var sprite: EightDirectionSprite3D -@export var hand_sprite: Sprite2D +#@export var hand_sprite: Sprite2D @export var interaction_raycast: RayCast3D @export var draw_pile: Inventory @export var hand: Inventory @@ -25,6 +25,8 @@ signal ready_state_changed(state: bool) @export var sprint_zoom_speed: float = 0.2 @export var player_name_tag: Label @export var weapon_swap_timer: Timer +@export var card3d_scene: PackedScene +@export var card_select_scene: PackedScene @export_subgroup("Audio") @export var ears: AudioListener3D @@ -37,6 +39,9 @@ signal ready_state_changed(state: bool) @export var swap_off_audio: AudioStreamPlayer @export var swap_on_audio: AudioStreamPlayer +var building_mode: bool = true +var selection_boxes: Array[CardSelectionBox] = [] +var unique_cards: Array[Card] = [] var hand_card_scene: PackedScene = preload("res://Scenes/UI/card_hand.tscn") var card_sprites: Array[CardInHand] var game_manager: GameManager @@ -66,6 +71,11 @@ var energy: int = 0 : hud.set_energy_amount(value) get: return energy +var selected_card: Card : + set(_value): + pass + get(): + return unique_cards[hand_selected_index] func set_zoom_factor(value: float) -> void: @@ -74,13 +84,13 @@ func set_zoom_factor(value: float) -> void: func _ready() -> void: if is_multiplayer_authority(): - right_hand_animator.play("weapon_sway") - right_hand_animator.speed_scale = 0 + #right_hand_animator.play("weapon_sway") + #right_hand_animator.speed_scale = 0 ears.make_current() camera.make_current() sprite.queue_free() hand.max_size = 5 - hand_sprite.texture = hero_class.hand_texture + #hand_sprite.texture = hero_class.hand_texture player_name_tag.queue_free() for card: Card in hero_class.deck: draw_pile.add(card) @@ -98,12 +108,12 @@ func _ready() -> void: func _physics_process(_delta: float) -> void: if !is_multiplayer_authority() or paused: return - if movement.input_vector == Vector2.ZERO: - right_hand_animator.speed_scale = 0 - elif movement.sprinting: - right_hand_animator.speed_scale = 1 - else: - right_hand_animator.speed_scale = 0.6 + #if movement.input_vector == Vector2.ZERO: + #right_hand_animator.speed_scale = 0 + #elif movement.sprinting: + #right_hand_animator.speed_scale = 1 + #else: + #right_hand_animator.speed_scale = 0.6 func _process(delta: float) -> void: @@ -135,20 +145,61 @@ func _process(delta: float) -> void: button.press(self) if interaction_raycast.get_collider() is ItemCard: add_card(interaction_raycast.get_collider().pick_up()) - if Input.is_action_just_pressed("Equip Primary Weapon"): - equip_weapon(0) - if Input.is_action_just_pressed("Equip Secondary Weapon"): - equip_weapon(1) - if Input.is_action_just_pressed("Select Next Card") and hand.size > 1: - increment_selected() - swap_card_audio.play() - if Input.is_action_just_pressed("Select Previous Card") and hand.size > 1: - decrement_selected() - swap_card_audio.play() - if Input.is_action_just_pressed("Primary Fire"): - edit_tool.interact_key_held = true - if Input.is_action_just_released("Primary Fire"): - edit_tool.interact_key_held = false + if building_mode: + if Input.is_action_just_pressed("Primary Fire"): + edit_tool.interact_key_held = true + if Input.is_action_just_released("Primary Fire"): + edit_tool.interact_key_held = false + if Input.is_action_just_pressed("Swap Weapons"): + edit_tool.interact_key_held = false + building_mode = false + $FirstPersonViewport/Head2/LeftHand.visible = true + $HUD/selection_boxes.visible = true + $HUD/PlaceIcon.visible = true + $HUD/SwapIcon.visible = true + else: + if Input.is_action_just_pressed("Primary Fire"): + equip_weapon(0) + if Input.is_action_just_pressed("Secondary Fire"): + equip_weapon(1) + if Input.is_action_just_pressed("Select Next Card") and hand.size > 1: + increment_selected() + swap_card_audio.play() + if Input.is_action_just_pressed("Select Previous Card") and hand.size > 1: + decrement_selected() + swap_card_audio.play() + if Input.is_action_just_pressed("Select 1st Card"): + if unique_cards.size() >= 1: + hand_selected_index = 0 + swap_card_audio.play() + update_selected_box() + if Input.is_action_just_pressed("Select 2nd Card"): + if unique_cards.size() >= 2: + hand_selected_index = 1 + swap_card_audio.play() + update_selected_box() + if Input.is_action_just_pressed("Select 3rd Card"): + if unique_cards.size() >= 3: + hand_selected_index = 2 + swap_card_audio.play() + update_selected_box() + if Input.is_action_just_pressed("Select 4th Card"): + if unique_cards.size() >= 4: + hand_selected_index = 3 + swap_card_audio.play() + update_selected_box() + if Input.is_action_just_pressed("Select 5th Card"): + if unique_cards.size() >= 5: + hand_selected_index = 4 + swap_card_audio.play() + update_selected_box() + if Input.is_action_just_pressed("Swap Weapons"): + building_mode = true + $FirstPersonViewport/Head2/LeftHand.visible = false + $HUD/selection_boxes.visible = false + $HUD/PlaceIcon.visible = false + $HUD/SwapIcon.visible = false + if weapons[equipped_weapon] != null: weapons[equipped_weapon].release_trigger() weapons[equipped_weapon].release_second_trigger() @@ -193,17 +244,19 @@ func _process(delta: float) -> void: func increment_selected() -> void: hand_selected_index += 1 - if hand_selected_index >= hand.size: + if hand_selected_index >= unique_cards.size(): hand_selected_index = 0 + update_selected_box() func decrement_selected() -> void: - if hand.size == 0: + if unique_cards.size() == 0: hand_selected_index = 0 return hand_selected_index -= 1 if hand_selected_index < 0: - hand_selected_index = hand.size - 1 + hand_selected_index = unique_cards.size() - 1 + update_selected_box() func _unhandled_input(event: InputEvent) -> void: @@ -267,6 +320,10 @@ func enter_editing_mode(value: int) -> void: hud.set_wave_count(value + 1) hud.set_energy_visible(false) hud.grow_wave_start_label() + $HUD/selection_boxes.visible = true + $HUD/EnergyLabel.visible = true + $HUD/weapon_duration.visible = true + $HUD/weapon_duration2.visible = true editing_mode = true edit_tool.enabled = true left_hand.visible = true @@ -277,6 +334,10 @@ func enter_editing_mode(value: int) -> void: func exit_editing_mode(value: int) -> void: gauntlet_sprite.visible = false + $HUD/selection_boxes.visible = false + $HUD/EnergyLabel.visible = false + $HUD/weapon_duration.visible = false + $HUD/weapon_duration2.visible = false weapons_active = false hud.set_wave_count(value) var offhand_weapon: Weapon = weapons[0] if equipped_weapon == 1 else weapons[1] @@ -302,28 +363,27 @@ func check_left_hand_valid() -> void: return if hand.size == 0: left_hand_sprite.visible = false - #gauntlet.texture.region = Rect2(64, 0, 64, 64) else: left_hand_sprite.visible = true - #gauntlet.texture.region = Rect2(0, 0, 64, 64) - var selected_card: Card = hand.item_at(hand_selected_index) - for index: int in card_sprites.size(): - if hand_selected_index == index: - var tween: Tween = create_tween() - tween.set_ease(Tween.EASE_OUT) - tween.set_trans(Tween.TRANS_CUBIC) - tween.tween_property(card_sprites[index], "position", Vector2(200.0 * index, -20.0), 0.5) - else: - var tween: Tween = create_tween() - tween.set_ease(Tween.EASE_OUT) - tween.set_trans(Tween.TRANS_CUBIC) - tween.tween_property(card_sprites[index], "position", Vector2(200.0 * index, 80.0), 0.5) - #if index < inventory.contents[selected_card]: - #card_sprites[index].visible = true - #card_sprites[index].set_card(selected_card) - ##card_sprites[index].view_weapon() - #else: - #card_sprites[index].visible = false + update_selected_box() + + +func check_removal() -> void: + var index: int = -1 + for card: Card in unique_cards: + if !hand.contents.has(card): + index = unique_cards.find(card) + if index >= 0: + unique_cards.remove_at(index) + selection_boxes[index].queue_free() + selection_boxes.remove_at(index) + for i: int in selection_boxes.size(): + var card: Card = unique_cards[i] + selection_boxes[i].set_card(card) + selection_boxes[i].set_key(i) + if hand_selected_index == index: + decrement_selected() + update_selected_box() func iterate_duration() -> void: @@ -346,22 +406,46 @@ func draw_to_hand_size() -> void: if draw_pile.size > 0: var card: Card = draw_pile.remove_at(0) hand.add(card) - var display: CardInHand = hand_card_scene.instantiate() + var display: Card3D = card3d_scene.instantiate() display.set_card(card) - $FirstPersonViewport/Head2/LeftHand/SubViewport.add_child(display) - card_sprites.append(display) - var tween: Tween = create_tween() - tween.set_ease(Tween.EASE_OUT) - tween.set_trans(Tween.TRANS_CUBIC) - tween.tween_property(display, "position", Vector2(200.0 * hand.size, 80.0), 0.5) + display.position = Vector3(0.01 * hand.size, 0.0, -0.001 * hand.size) + display.rotation_degrees = Vector3(0.0, 0.0, -10.0 * hand.size) + $FirstPersonViewport/Head2/LeftHand/Cards.add_child(display) + #var tween: Tween = create_tween() + #tween.set_ease(Tween.EASE_OUT) + #tween.set_trans(Tween.TRANS_CUBIC) + #tween.tween_property(display, "position", Vector2(200.0 * hand.size, 80.0), 0.5) else: for x: int in discard_pile.size: draw_pile.add(discard_pile.remove_at(0)) draw_pile.shuffle() + unique_cards = [] + selection_boxes = [] + for card: Card in hand.contents: + if !unique_cards.has(card): + unique_cards.append(card) + for i: int in $HUD/selection_boxes.get_child_count(): + $HUD/selection_boxes.get_child(i).queue_free() + for i: int in unique_cards.size(): + var card: Card = unique_cards[i] + var box: CardSelectionBox = card_select_scene.instantiate() + box.set_card(card) + box.set_key(i) + selection_boxes.append(box) + $HUD/selection_boxes.add_child(box) + hand_selected_index = 0 + update_selected_box() + + +func update_selected_box() -> void: + for box: CardSelectionBox in selection_boxes: + box.deselect() + selection_boxes[hand_selected_index].select() func equip_weapon(slot: int = 0) -> void: var energy_cost: int = int(hand.item_at(hand_selected_index).rarity) + 1 + energy_cost *= 2 if energy < energy_cost: return if weapons[slot] != null: @@ -369,13 +453,13 @@ func equip_weapon(slot: int = 0) -> void: if hand.size > 0: energy -= energy_cost place_card_audio.play() - cards[slot] = hand.remove_at(hand_selected_index) - card_sprites[hand_selected_index].queue_free() - card_sprites.remove_at(hand_selected_index) + cards[slot] = hand.remove_at(hand.contents.find(selected_card)) + #card_sprites[hand_selected_index].queue_free() + #card_sprites.remove_at(hand_selected_index) discard_pile.add(cards[slot]) #TODO: Alternate thing to do with the hand i guess #if !inventory.contents.has(cards[slot]): - decrement_selected() + #decrement_selected() weapons[slot] = cards[slot].weapon_scene.instantiate() weapons[slot].name = str(weapons_spawn_count) weapons[slot].duration = cards[slot].duration @@ -396,6 +480,7 @@ func equip_weapon(slot: int = 0) -> void: weapons[slot].set_hero(self) weapons[slot].visible = false right_hand.add_child(weapons[slot]) + check_removal() check_left_hand_valid() if slot == 0: weapons[slot].energy_spent.connect(hud.new_energy_bar.use_energy) diff --git a/PCs/hero.tscn b/PCs/hero.tscn index 3eeb430..5609b7d 100644 --- a/PCs/hero.tscn +++ b/PCs/hero.tscn @@ -5,14 +5,17 @@ [ext_resource type="PackedScene" uid="uid://ri8r03wqy80t" path="res://Scenes/8_direction_sprite.tscn" id="2_ib0t5"] [ext_resource type="Texture2D" uid="uid://dkbkam81k355s" path="res://Assets/TextureAtlases/gauntlet.tres" id="3_5myy0"] [ext_resource type="PackedScene" uid="uid://buvgdem68wtev" path="res://Scenes/Menus/PauseMenu/pause_menu.tscn" id="3_avnsx"] +[ext_resource type="PackedScene" uid="uid://n8ab1cy7ordc" path="res://card_model/3d_card.tscn" id="4_2mqvj"] [ext_resource type="Script" uid="uid://cij76at0nbs1v" path="res://PCs/view_movement.gd" id="4_mhexa"] [ext_resource type="PackedScene" uid="uid://dixtx38u4jhd7" path="res://Scenes/UI/card_hand.tscn" id="4_mwtvp"] +[ext_resource type="PackedScene" uid="uid://gdd1xupf4oxx" path="res://UI/CardSelectionBox/card_selection_box.tscn" id="5_h82f6"] [ext_resource type="PackedScene" uid="uid://dqt1ggtkpkuhs" path="res://PCs/PathEditTool/path_edit_tool.tscn" id="5_jlxb3"] [ext_resource type="Script" uid="uid://do24iuot0j7d7" path="res://Scripts/inventory.gd" id="6_cf5ap"] [ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://Classes/Engineer/red.png" id="6_yyp8i"] +[ext_resource type="Script" uid="uid://3wvxl8jo4uis" path="res://PCs/weapon_movement.gd" id="7_14ugt"] [ext_resource type="Script" uid="uid://b6kjrl7ae1mi0" path="res://PCs/hud.gd" id="8_yl6ka"] -[ext_resource type="Texture2D" uid="uid://ctkixdue3o7ec" path="res://Classes/Engineer/red_hand.png" id="9_gxh2h"] [ext_resource type="Script" uid="uid://hy51bq7x0fy8" path="res://Scripts/on_top_camera.gd" id="11_4sdwe"] +[ext_resource type="PackedScene" uid="uid://ckl5tw5rmewhp" path="res://left_hand/card_hand_model.glb" id="11_h82f6"] [ext_resource type="Script" uid="uid://ckkioruqgbs8p" path="res://Scripts/minimap_cam.gd" id="12_3hpi3"] [ext_resource type="Texture2D" uid="uid://b6iego7256jf2" path="res://Assets/Textures/wavecounter.png" id="14_l34nu"] [ext_resource type="PackedScene" uid="uid://24x18qxqhy0i" path="res://Scenes/UI/lives_bar.tscn" id="15_cqpib"] @@ -49,25 +52,6 @@ radius = 0.3 height = 1.8 -[sub_resource type="Environment" id="Environment_ekmug"] - -[sub_resource type="Animation" id="Animation_2q50p"] -resource_name = "weapon_sway" -length = 0.8 -loop_mode = 1 -tracks/0/type = "position_3d" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = PackedFloat32Array(0, 1, 0.615, -0.275, -1, 0.2, 1, 0.59, -0.255, -1, 0.4, 1, 0.615, -0.275, -1, 0.6, 1, 0.66, -0.255, -1, 0.8, 1, 0.615, -0.275, -1) - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_2wknc"] -_data = { -&"weapon_sway": SubResource("Animation_2q50p") -} - [sub_resource type="ViewportTexture" id="ViewportTexture_8f12g"] viewport_path = NodePath("FirstPersonViewport/Head2/LeftHand/SubViewport") @@ -129,7 +113,7 @@ stream_0/stream = ExtResource("36_lsvj8") streams_count = 1 stream_0/stream = ExtResource("37_kv1mg") -[node name="Hero" type="CharacterBody3D" node_paths=PackedStringArray("camera", "gun_camera", "left_hand_sprite", "left_hand", "right_hand", "right_hand_animator", "edit_tool", "gauntlet_sprite", "sprite", "hand_sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "gauntlet_cards", "hud", "movement", "player_name_tag", "weapon_swap_timer", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio")] +[node name="Hero" type="CharacterBody3D" node_paths=PackedStringArray("camera", "gun_camera", "left_hand_sprite", "left_hand", "right_hand", "edit_tool", "gauntlet_sprite", "sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "gauntlet_cards", "hud", "movement", "player_name_tag", "weapon_swap_timer", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio")] collision_layer = 2 collision_mask = 37 script = ExtResource("1_pihpe") @@ -139,11 +123,9 @@ gun_camera = NodePath("FirstPersonViewport/Head2") left_hand_sprite = NodePath("FirstPersonViewport/Head2/LeftHand/Sprite3D") left_hand = NodePath("FirstPersonViewport/Head2/LeftHand") right_hand = NodePath("FirstPersonViewport/Head2/RightHand") -right_hand_animator = NodePath("FirstPersonViewport/Head2/RightHand/AnimationPlayer") edit_tool = NodePath("ViewMovement/Head/EditTool") gauntlet_sprite = NodePath("FirstPersonViewport/Head2/RightHand/Gauntlet") sprite = NodePath("EightDirectionSprite") -hand_sprite = NodePath("FirstPersonViewport/Head2/LeftHand/SubViewport/Sprite2D") interaction_raycast = NodePath("ViewMovement/Head/RayCast3D") draw_pile = NodePath("DrawPile") hand = NodePath("Hand") @@ -154,6 +136,8 @@ hud = NodePath("HUD") movement = NodePath("PlayerMovement") player_name_tag = NodePath("NametagViewport/Label") weapon_swap_timer = NodePath("WeaponSwapTimer") +card3d_scene = ExtResource("4_2mqvj") +card_select_scene = ExtResource("5_h82f6") ears = NodePath("AudioListener3D") place_card_audio = NodePath("PlaceCardAudio") swap_card_audio = NodePath("SwapCardAudio") @@ -177,6 +161,8 @@ script = ExtResource("4_mhexa") player = NodePath("..") camera = NodePath("Head") focus_raycast = NodePath("Head/RayCast3D") +enable_strafe_tilt = true +tilt_amount_x = 0.7 [node name="Head" type="Camera3D" parent="ViewMovement"] keep_aspect = 0 @@ -202,37 +188,27 @@ render_target_update_mode = 4 [node name="Head2" type="Camera3D" parent="FirstPersonViewport" node_paths=PackedStringArray("clone_camera")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.62, 0) cull_mask = 2 -environment = SubResource("Environment_ekmug") -projection = 1 script = ExtResource("11_4sdwe") clone_camera = NodePath("../../ViewMovement/Head") -[node name="RightHand" type="Node3D" parent="FirstPersonViewport/Head2"] -transform = Transform3D(0.7, 0, 0, 0, 0.7, 0, 0, 0, 0.7, 0.66, -0.255, -0.221557) - -[node name="AnimationPlayer" type="AnimationPlayer" parent="FirstPersonViewport/Head2/RightHand"] -libraries = { -&"": SubResource("AnimationLibrary_2wknc") -} +[node name="RightHand" type="Node3D" parent="FirstPersonViewport/Head2" node_paths=PackedStringArray("player")] +transform = Transform3D(0.7, 0, 0, 0, 0.7, 0, 0, 0, 0.7, 0.41, -0.17, -0.495) +script = ExtResource("7_14ugt") +player = NodePath("../../..") +enable_strafe_tilt = true +tilt_amount_x = 12.0 +tilt_amount_y = 3.0 +weapon_rotation_amount = 0.001 [node name="Gauntlet" type="Sprite3D" parent="FirstPersonViewport/Head2/RightHand"] +visible = false layers = 2 texture_filter = 0 texture = ExtResource("3_5myy0") [node name="LeftHand" type="Node3D" parent="FirstPersonViewport/Head2"] -transform = Transform3D(0.235, 0, 0, 0, 0.235, 0, 0, 0, 0.235, -0.665, -0.275, -0.221557) - -[node name="SubViewport" type="SubViewport" parent="FirstPersonViewport/Head2/LeftHand"] -transparent_bg = true -size = Vector2i(1400, 800) -render_target_update_mode = 4 - -[node name="Sprite2D" type="Sprite2D" parent="FirstPersonViewport/Head2/LeftHand/SubViewport"] -texture_filter = 1 -position = Vector2(512, 256) -scale = Vector2(8, 8) -texture = ExtResource("9_gxh2h") +transform = Transform3D(0.235, 0, 0, 0, 0.235, 0, 0, 0, 0.235, -0.645, -0.26, -1.04) +visible = false [node name="SubViewport2" type="SubViewport" parent="FirstPersonViewport/Head2/LeftHand"] transparent_bg = true @@ -268,6 +244,15 @@ sorting_offset = 1.0 texture_filter = 0 texture = SubResource("ViewportTexture_xme80") +[node name="card_hand_model" parent="FirstPersonViewport/Head2/LeftHand" instance=ExtResource("11_h82f6")] +transform = Transform3D(-4.16989, -0.848374, -3.61733e-07, -0.824933, 4.05468, -0.993384, 0.198049, -0.973442, -4.13774, 1.56596, 0.519149, 3.37051) + +[node name="Body_004" parent="FirstPersonViewport/Head2/LeftHand/card_hand_model/Armature/Skeleton3D" index="0"] +layers = 2 + +[node name="Cards" type="Node3D" parent="FirstPersonViewport/Head2/LeftHand"] +transform = Transform3D(4.25532, 0, 0, 0, 4.25532, 0, 0, 0, 4.25532, 2.01277, 0.787234, 3.39179) + [node name="MiniMapViewport" type="SubViewport" parent="."] size = Vector2i(256, 256) render_target_update_mode = 4 @@ -325,7 +310,7 @@ script = ExtResource("6_cf5ap") [node name="DiscardPile" type="Node" parent="."] script = ExtResource("6_cf5ap") -[node name="PlayerMovement" type="Node" parent="." node_paths=PackedStringArray("player", "head")] +[node name="PlayerMovement" type="Node" parent="." node_paths=PackedStringArray("player", "head", "weapon_holder")] script = ExtResource("20_cfhw8") player = NodePath("..") head = NodePath("../ViewMovement") @@ -333,6 +318,7 @@ toggle_sprint = true max_look_down_angle = 80.0 max_look_up_angle = 80.0 enable_jumping = true +weapon_holder = NodePath("../FirstPersonViewport/Head2/RightHand") [node name="HUD" type="CanvasLayer" parent="." node_paths=PackedStringArray("player", "wave_count", "lives_count", "currency_count", "minimap_outline", "minimap", "minimap_cam", "minimap_viewport", "fps_label", "hover_text", "enemy_sprites", "enemy_counts", "wave_start_label", "place_icon", "swap_icon", "place_text", "swap_text", "new_energy_bar", "energy_label", "primary_duration", "secondary_duration")] script = ExtResource("8_yl6ka") @@ -370,6 +356,7 @@ mouse_filter = 2 texture = SubResource("ViewportTexture_mk87g") [node name="PlaceIcon" type="TextureRect" parent="HUD"] +visible = false anchors_preset = 3 anchor_left = 1.0 anchor_top = 1.0 @@ -391,12 +378,13 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 bbcode_enabled = true -text = "#Equip Primary Weapon#" +text = "#Primary Fire#" scroll_active = false horizontal_alignment = 1 vertical_alignment = 1 [node name="SwapIcon" type="TextureRect" parent="HUD"] +visible = false anchors_preset = 3 anchor_left = 1.0 anchor_top = 1.0 @@ -418,7 +406,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 bbcode_enabled = true -text = "#Equip Secondary Weapon#" +text = "#Secondary Fire#" scroll_active = false horizontal_alignment = 1 vertical_alignment = 1 @@ -781,6 +769,14 @@ text = "secondary weapon rounds left = 0" horizontal_alignment = 1 vertical_alignment = 1 +[node name="selection_boxes" type="HBoxContainer" parent="HUD"] +visible = false +offset_left = 73.0 +offset_top = 457.0 +offset_right = 753.0 +offset_bottom = 585.0 +alignment = 1 + [node name="WeaponSwapTimer" type="Timer" parent="."] wait_time = 0.4 one_shot = true @@ -821,3 +817,5 @@ stream = ExtResource("41_hussy") bus = &"SFX" [connection signal="timeout" from="WeaponSwapTimer" to="." method="_on_timer_timeout"] + +[editable path="FirstPersonViewport/Head2/LeftHand/card_hand_model"] diff --git a/PCs/hud.gd b/PCs/hud.gd index 94b4f73..b0ab3a4 100644 --- a/PCs/hud.gd +++ b/PCs/hud.gd @@ -72,8 +72,8 @@ func set_energy_visible(value: bool) -> void: func _process(_delta: float) -> void: fps_label.text = "FPS: " + str(Engine.get_frames_per_second()) wave_start_label.text = parse_action_tag("[center]Press #Ready# to start wave") - place_text.text = parse_action_tag("[center]#Equip Primary Weapon#") - swap_text.text = parse_action_tag("[center]#Equip Secondary Weapon#") + place_text.text = parse_action_tag("[center]#Primary Fire#") + swap_text.text = parse_action_tag("[center]#Secondary Fire#") func grow_wave_start_label() -> void: diff --git a/PCs/player_movement.gd b/PCs/player_movement.gd index ed5c5fd..80e1e25 100644 --- a/PCs/player_movement.gd +++ b/PCs/player_movement.gd @@ -64,6 +64,7 @@ var prev_crouch_height: float = 0.0 var new_crouch_height: float = 0.0 var default_camera_height: float = 0.0 var change_crouch: bool = false +@export var weapon_holder: WeaponMovement var head_angle: float = 0.0 var look_sens: float : @@ -225,6 +226,8 @@ func _unhandled_input(event: InputEvent) -> void: head_angle -= event.relative.y * (look_sens / zoom_factor) * (-1 if invert_y else 1) head_angle = clamp(head_angle, deg_to_rad(-max_look_down_angle), deg_to_rad(max_look_up_angle)) head.rotation.x = head_angle + if weapon_holder: + weapon_holder.mouse_input = event.relative elif event is InputEventJoypadMotion: if event.axis == JOY_AXIS_RIGHT_X: look_vector.x = event.axis_value diff --git a/PCs/weapon_movement.gd b/PCs/weapon_movement.gd new file mode 100644 index 0000000..91d4ba0 --- /dev/null +++ b/PCs/weapon_movement.gd @@ -0,0 +1,42 @@ +class_name WeaponMovement +extends Node3D + +@export var player: CharacterBody3D + +@export_category("Strafe Tilting") +@export var enable_strafe_tilt: bool = false +@export var tilt_max_effect_speed: float = 4.317 +@export var tilt_amount_x: float = 0.75 +@export var tilt_amount_y: float = 0.0 + +@export var weapon_rotation_amount: float = 1 +@export var enable_mouse_sway: bool = true +var mouse_input: Vector2 +var invert_weapon_sway: bool = true + + +func _process(delta: float) -> void: + var tilt: Vector3 = Vector3.ZERO + var sway: Vector3 = Vector3.ZERO + if enable_strafe_tilt: + tilt = get_strafe_tilt(player.velocity) + if enable_mouse_sway: + sway = weapon_sway(delta) + rotation = lerp(rotation, tilt + sway, 10 * delta) + + +func get_strafe_tilt(player_velocity: Vector3) -> Vector3: + var side_dot: float = player_velocity.normalized().dot(-global_transform.basis.z) + var front_dot: float = player_velocity.normalized().dot(-global_transform.basis.x) + var tilt_speed_factor: float = player_velocity.length() / tilt_max_effect_speed + var tilt_vector: Vector3 = Vector3.ZERO + tilt_vector.z = deg_to_rad(tilt_amount_x * front_dot * tilt_speed_factor) + tilt_vector.x = deg_to_rad(tilt_amount_y * -side_dot * tilt_speed_factor) + return tilt_vector + + +func weapon_sway(delta: float) -> Vector3: + var vector: Vector3 = Vector3.ZERO + vector.x = mouse_input.y * weapon_rotation_amount * (-1 if invert_weapon_sway else 1) + vector.y = mouse_input.x * weapon_rotation_amount * (-1 if invert_weapon_sway else 1) + return vector diff --git a/PCs/weapon_movement.gd.uid b/PCs/weapon_movement.gd.uid new file mode 100644 index 0000000..4f25c67 --- /dev/null +++ b/PCs/weapon_movement.gd.uid @@ -0,0 +1 @@ +uid://3wvxl8jo4uis diff --git a/Scenes/CardPrinter/card_printer.gd b/Scenes/CardPrinter/card_printer.gd index be11890..719e729 100644 --- a/Scenes/CardPrinter/card_printer.gd +++ b/Scenes/CardPrinter/card_printer.gd @@ -79,8 +79,8 @@ func card_picked_up(card_item: CardItem) -> void: func _on_static_body_3d_button_interacted(_value: int, reply: Hero) -> void: reply_player = reply - if reply.energy >= 3: - reply.energy -= 3 + if reply.energy >= 8: + reply.energy -= 8 else: return button_collider.disabled = true diff --git a/Scenes/CardPrinter/card_printer.tscn b/Scenes/CardPrinter/card_printer.tscn index d2a913c..a641fed 100644 --- a/Scenes/CardPrinter/card_printer.tscn +++ b/Scenes/CardPrinter/card_printer.tscn @@ -29,8 +29,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.847404, 0.610684) collision_layer = 16 collision_mask = 0 script = ExtResource("4_eavi1") -press_cost = 3 -hover_text = "[center]#Interact# draft a card for 3 Energy" +press_cost = 8 +hover_text = "[center]#Interact# draft a card for 8 Energy" [node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D"] transform = Transform3D(1, 0, 0, 0, 0.866025, -0.5, 0, 0.5, 0.866025, -6.55949e-05, 0.349496, -0.579584) diff --git a/Scripts/Resources/card.gd b/Scripts/Resources/card.gd index 6270b31..bf86741 100644 --- a/Scripts/Resources/card.gd +++ b/Scripts/Resources/card.gd @@ -14,3 +14,4 @@ enum Faction { @export var weapon_scene: PackedScene @export var weapon_stats: CardText @export var tower_stats: CardText +@export var tags: Array[Data.CardTags] diff --git a/Scripts/Weapons/hitscan_weapon.gd b/Scripts/Weapons/hitscan_weapon.gd index c473ba2..0026145 100644 --- a/Scripts/Weapons/hitscan_weapon.gd +++ b/Scripts/Weapons/hitscan_weapon.gd @@ -11,7 +11,7 @@ func _ready() -> void: super._ready() attack_range = stats.get_attribute("Range") raycast.target_position = Vector3(0, 0, -attack_range) - range_debug_indicator.radius = attack_range + #range_debug_indicator.radius = attack_range raycast.global_position = hero.camera.global_position diff --git a/Scripts/Weapons/weapon.gd b/Scripts/Weapons/weapon.gd index 6af34b9..aa7cc1f 100644 --- a/Scripts/Weapons/weapon.gd +++ b/Scripts/Weapons/weapon.gd @@ -87,7 +87,7 @@ func release_second_trigger() -> void: func shoot() -> void: - animator.play("shoot") + #animator.play("shoot") audio_player.play() recharging = false recharge_speed = 0.0 diff --git a/Scripts/card_hand.gd b/Scripts/card_hand.gd index e2a2892..a2a1ace 100644 --- a/Scripts/card_hand.gd +++ b/Scripts/card_hand.gd @@ -16,15 +16,15 @@ func set_card(value: Card) -> void: target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type]) rarity_sprite.region_rect = Rect2(64 * stats.rarity, 0, 64, 64) if stats.rarity == Data.Rarity.COMMON: - energy_cost.text = "1" - if stats.rarity == Data.Rarity.UNCOMMON: energy_cost.text = "2" - if stats.rarity == Data.Rarity.RARE: - energy_cost.text = "3" - if stats.rarity == Data.Rarity.EPIC: + if stats.rarity == Data.Rarity.UNCOMMON: energy_cost.text = "4" + if stats.rarity == Data.Rarity.RARE: + energy_cost.text = "6" + if stats.rarity == Data.Rarity.EPIC: + energy_cost.text = "8" if stats.rarity == Data.Rarity.LEGENDARY: - energy_cost.text = "5" + energy_cost.text = "10" duration.text = str(value.duration) diff --git a/Scripts/card_item.gd b/Scripts/card_item.gd index 1122ada..05a3b08 100644 --- a/Scripts/card_item.gd +++ b/Scripts/card_item.gd @@ -6,20 +6,14 @@ signal pressed(card_item: CardItem) @export var outline_mesh: MeshInstance3D @export var card_ui: CardInHand var card: Card = null -var rarity_colors: Array[Color] = [ - Color8(255, 255, 255), - Color8(50, 204, 36), - Color8(36, 59, 204), - Color8(181, 36, 204), - Color8(225, 112, 30) -] + func set_card(new_card: Card) -> void: card = new_card card_ui.set_card(card) card_ui.view_tower() - outline_mesh.get_surface_override_material(0).albedo_color = rarity_colors[card.rarity] + outline_mesh.get_surface_override_material(0).albedo_color = Data.rarity_colors[card.rarity] #print(rarity_colors[card.rarity]) diff --git a/Scripts/data.gd b/Scripts/data.gd index 3221f0f..d263b37 100644 --- a/Scripts/data.gd +++ b/Scripts/data.gd @@ -17,6 +17,7 @@ enum EnergyType {UNDEFINED = 0, DISCRETE = 1, CONTINUOUS = 2} enum TargetType {UNDEFINED = 0, LAND = 1, AIR = 2, BOTH = 3} enum EnemyType {UNDEFINED = 0, LAND = 1, AIR = 2} enum Rarity {COMMON = 0, UNCOMMON = 1, RARE = 2, EPIC = 3, LEGENDARY = 4} +enum CardTags {DAMAGE = 0, UTILITY = 1, TARGETS_FLYING = 2} static var starting_cash: int = 10 static var wall_cost: int = 1 @@ -26,8 +27,15 @@ static var rarity_weights: Dictionary = { "UNCOMMON" = 30, "RARE" = 10, "EPIC" = 4, - "LEGENDARY" = 1 + "LEGENDARY" = 1, } +static var rarity_colors: Array[Color] = [ + Color8(255, 255, 255), + Color8(50, 204, 36), + Color8(36, 59, 204), + Color8(181, 36, 204), + Color8(225, 112, 30), +] ## Recursively searches a folder for any Card resources and loads them diff --git a/Scripts/game.gd b/Scripts/game.gd index e970260..eb8ac80 100644 --- a/Scripts/game.gd +++ b/Scripts/game.gd @@ -248,7 +248,7 @@ func end_wave() -> void: for peer_id: int in connected_players_nodes: var player: Hero = connected_players_nodes[peer_id] as Hero player.currency += ceili(pot / connected_players_nodes.size()) - player.energy = 8 + player.energy = 12 player.iterate_duration() player.draw_to_hand_size() player.unready_self() @@ -318,7 +318,7 @@ func start() -> void: spawn_players() for peer_id: int in connected_players_nodes: connected_players_nodes[peer_id].currency = ceili(float(Data.starting_cash) / float(connected_players_nodes.size())) - connected_players_nodes[peer_id].energy = 8 + connected_players_nodes[peer_id].energy = 12 connected_players_nodes[peer_id].draw_pile.shuffle() connected_players_nodes[peer_id].draw_to_hand_size() diff --git a/Scripts/inventory.gd b/Scripts/inventory.gd index 3ea507a..9d3e026 100644 --- a/Scripts/inventory.gd +++ b/Scripts/inventory.gd @@ -24,8 +24,8 @@ func add(item: Item) -> bool: func item_at(index: int) -> Item: - #if size == 0: - #return null + if size == 0: + return null var item: Item = contents[index] return item diff --git a/Shaders/tiler.gdshader b/Shaders/tiler.gdshader index 3e7f620..26087cf 100644 --- a/Shaders/tiler.gdshader +++ b/Shaders/tiler.gdshader @@ -19,7 +19,7 @@ void fragment() { offset_uv.x += offset; - vec2 scaled_uv = vec2(fract(offset_uv.x * repeat_x), + vec2 scaled_uv = vec2(fract(offset_uv.x * repeat_x), fract(offset_uv.y * repeat_y)); vec2 texelSize = vec2(1.0) / vec2(textureSize(texture_to_scroll, 0)); diff --git a/UI/CardSelectionBox/card_selection_box.gd b/UI/CardSelectionBox/card_selection_box.gd new file mode 100644 index 0000000..c855b91 --- /dev/null +++ b/UI/CardSelectionBox/card_selection_box.gd @@ -0,0 +1,71 @@ +class_name CardSelectionBox +extends Control + +@export var icon: TextureRect +@export var tags: VBoxContainer +@export var cost_label: Label +@export var lifetime_label: Label +@export var unselected_style_box: StyleBoxFlat +@export var selected_style_box: StyleBoxFlat + + +func set_card(card: Card) -> void: + icon.texture = card.icon + cost_label.text = str(card.rarity + 1) + lifetime_label.text = str(card.duration) + for i: int in tags.get_child_count(): + tags.get_child(i).queue_free() + for tag: Data.CardTags in card.tags: + var tag_icon: TextureRect = icon.duplicate() + if tag == Data.CardTags.DAMAGE: + tag_icon.texture = load("res://Assets/Textures/damage_icon.png") + if tag == Data.CardTags.UTILITY: + tag_icon.texture = load("res://Assets/Textures/utility_icon.png") + if tag == Data.CardTags.TARGETS_FLYING: + tag_icon.modulate = Color.FIREBRICK + tag_icon.texture = load("res://Assets/Textures/flight_icon.png") + tags.add_child(tag_icon) + + +func set_key(slot: int) -> void: + match(slot): + 0: + $Label.text = parse_action_tag("#Select 1st Card#") + 1: + $Label.text = parse_action_tag("#Select 2nd Card#") + 2: + $Label.text = parse_action_tag("#Select 3rd Card#") + 3: + $Label.text = parse_action_tag("#Select 4th Card#") + 44: + $Label.text = parse_action_tag("#Select 5th Card#") + + +func parse_action_tag(text: String) -> String: + var string_array: PackedStringArray = text.split("#") + var output: Array[String] = [] + if string_array.size() > 1: + for i: int in InputMap.action_get_events(string_array[1]).size(): + var event: InputEvent = InputMap.action_get_events(string_array[1])[i] + if InputMap.action_get_events(string_array[1]).size() > 1: + var last: bool = true if i == InputMap.action_get_events(string_array[1]).size() - 1 else false + var first: bool = true if i == 0 else false + if last: + output.append(" or ") + elif !first: + output.append(", ") + if event is InputEventKey: + output.append("[img=top,50]%s[/img]" % KeyIconMap.keys[str(event.physical_keycode)]) + if event is InputEventMouseButton: + output.append("[img=top,50]%s[/img]" % KeyIconMap.mouse_buttons[str(event.button_index)]) + string_array[1] = "".join(output) + text = "".join(string_array) + return text + + +func select() -> void: + $PanelContainer.add_theme_stylebox_override("panel", selected_style_box) + + +func deselect() -> void: + $PanelContainer.add_theme_stylebox_override("panel", unselected_style_box) diff --git a/UI/CardSelectionBox/card_selection_box.gd.uid b/UI/CardSelectionBox/card_selection_box.gd.uid new file mode 100644 index 0000000..5ad1e0c --- /dev/null +++ b/UI/CardSelectionBox/card_selection_box.gd.uid @@ -0,0 +1 @@ +uid://87h0a76hdx4b diff --git a/UI/CardSelectionBox/card_selection_box.tscn b/UI/CardSelectionBox/card_selection_box.tscn new file mode 100644 index 0000000..3017f64 --- /dev/null +++ b/UI/CardSelectionBox/card_selection_box.tscn @@ -0,0 +1,78 @@ +[gd_scene load_steps=6 format=3 uid="uid://gdd1xupf4oxx"] + +[ext_resource type="Texture2D" uid="uid://b165eh481oodf" path="res://Assets/Textures/damage_icon.png" id="1_k8442"] +[ext_resource type="Script" uid="uid://87h0a76hdx4b" path="res://UI/CardSelectionBox/card_selection_box.gd" id="1_m0g3h"] +[ext_resource type="StyleBox" uid="uid://c4ye5r2xdsocm" path="res://UI/CardSelectionBox/unselected_style_box.tres" id="2_0817q"] +[ext_resource type="StyleBox" uid="uid://csbgndc6vfayf" path="res://UI/CardSelectionBox/selected_style_box.tres" id="2_ek0dh"] +[ext_resource type="Texture2D" uid="uid://bpcyxdpog3w85" path="res://Assets/Textures/assault_icon.png" id="2_m0g3h"] + +[node name="Control" type="Control" node_paths=PackedStringArray("icon", "tags", "cost_label", "lifetime_label")] +custom_minimum_size = Vector2(170, 0) +layout_mode = 3 +anchors_preset = 0 +script = ExtResource("1_m0g3h") +icon = NodePath("PanelContainer/HBoxContainer/Icon") +tags = NodePath("PanelContainer/HBoxContainer/MarginContainer/Tags") +cost_label = NodePath("PanelContainer/HBoxContainer/Stats/Cost") +lifetime_label = NodePath("PanelContainer/HBoxContainer/Stats/Lifetime") +unselected_style_box = ExtResource("2_0817q") +selected_style_box = ExtResource("2_ek0dh") + +[node name="PanelContainer" type="PanelContainer" parent="."] +layout_mode = 2 +offset_right = 152.0 +offset_bottom = 124.0 +theme_override_styles/panel = ExtResource("2_ek0dh") + +[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"] +layout_mode = 2 + +[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_bottom = 10 + +[node name="Tags" type="VBoxContainer" parent="PanelContainer/HBoxContainer/MarginContainer"] +layout_mode = 2 + +[node name="Icon2" type="TextureRect" parent="PanelContainer/HBoxContainer/MarginContainer/Tags"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("1_k8442") +stretch_mode = 5 + +[node name="Icon" type="TextureRect" parent="PanelContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +texture = ExtResource("2_m0g3h") +stretch_mode = 5 + +[node name="Stats" type="VBoxContainer" parent="PanelContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Cost" type="Label" parent="PanelContainer/HBoxContainer/Stats"] +layout_mode = 2 +size_flags_vertical = 7 +text = "3" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Lifetime" type="Label" parent="PanelContainer/HBoxContainer/Stats"] +layout_mode = 2 +size_flags_vertical = 7 +text = "6" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Label" type="RichTextLabel" parent="."] +layout_mode = 1 +offset_left = -25.0 +offset_top = 100.0 +offset_right = 25.0 +offset_bottom = 150.0 +bbcode_enabled = true +text = "[img=top,50]/home/lexi/godot/multiplayer_tower_defense/UI/Keybinding/XeluController&KeyPrompts/Keyboard & Mouse/Light/1_Key_Light.png[/img]" +fit_content = true +vertical_alignment = 2 diff --git a/UI/CardSelectionBox/selected_style_box.tres b/UI/CardSelectionBox/selected_style_box.tres new file mode 100644 index 0000000..190b603 --- /dev/null +++ b/UI/CardSelectionBox/selected_style_box.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://csbgndc6vfayf"] + +[resource] +content_margin_left = 8.0 +content_margin_top = 0.0 +content_margin_right = 8.0 +content_margin_bottom = 0.0 +bg_color = Color(0.430763, 0.633388, 0.725502, 1) diff --git a/UI/CardSelectionBox/unselected_style_box.tres b/UI/CardSelectionBox/unselected_style_box.tres new file mode 100644 index 0000000..ff3bb5b --- /dev/null +++ b/UI/CardSelectionBox/unselected_style_box.tres @@ -0,0 +1,6 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://c4ye5r2xdsocm"] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +bg_color = Color(0.292, 0.292, 0.292, 0.89) diff --git a/Weapons/Assault/rifle.tscn b/Weapons/Assault/rifle.tscn new file mode 100644 index 0000000..6747b6d --- /dev/null +++ b/Weapons/Assault/rifle.tscn @@ -0,0 +1,41 @@ +[gd_scene load_steps=6 format=3 uid="uid://bn3t6sjupdxgi"] + +[ext_resource type="Script" uid="uid://bp3o5klntwmhd" path="res://Scripts/Weapons/hitscan_weapon.gd" id="1_yvp43"] +[ext_resource type="Resource" uid="uid://smctw4ogm4rx" path="res://Weapons/Assault/weapon_stats.tres" id="2_2k4c7"] +[ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://Audio/shot1.wav" id="2_5wfsb"] +[ext_resource type="PackedScene" uid="uid://ccltaimvldxfu" path="res://Gun Thing.glb" id="3_2k4c7"] + +[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_1hdrg"] +random_pitch = 1.1 +streams_count = 1 +stream_0/stream = ExtResource("2_5wfsb") + +[node name="Rifle" type="Node3D" node_paths=PackedStringArray("raycast", "audio_player", "recharge_timer")] +script = ExtResource("1_yvp43") +raycast = NodePath("RayCast3D") +stats = ExtResource("2_2k4c7") +audio_player = NodePath("AudioStreamPlayer3D") +recharge_timer = NodePath("Timer") +metadata/_custom_type_script = "uid://bp3o5klntwmhd" + +[node name="RayCast3D" type="RayCast3D" parent="."] +target_position = Vector3(0, 0, -1) +collision_mask = 4 + +[node name="Timer" type="Timer" parent="."] +wait_time = 4.0 +one_shot = true + +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."] +stream = SubResource("AudioStreamRandomizer_1hdrg") +bus = &"SFX" + +[node name="Gun Thing" parent="." instance=ExtResource("3_2k4c7")] +transform = Transform3D(-0.175, 0, -2.64243e-08, 0, 0.175, 0, 2.64243e-08, 0, -0.175, 0, 0.156021, 0) + +[node name="Cube" parent="Gun Thing" index="0"] +layers = 2 + +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] + +[editable path="Gun Thing"] diff --git a/Weapons/Assault/rifle_tex.png b/Weapons/Assault/rifle_tex.png new file mode 100644 index 0000000..b235e56 Binary files /dev/null and b/Weapons/Assault/rifle_tex.png differ diff --git a/Weapons/Assault/rifle_tex.png.import b/Weapons/Assault/rifle_tex.png.import new file mode 100644 index 0000000..8ce0fd3 --- /dev/null +++ b/Weapons/Assault/rifle_tex.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://u8p3xcl3gvie" +path.s3tc="res://.godot/imported/rifle_tex.png-066373a8f602fd3a3436ea7b29f3f62c.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Weapons/Assault/rifle_tex.png" +dest_files=["res://.godot/imported/rifle_tex.png-066373a8f602fd3a3436ea7b29f3f62c.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 diff --git a/Weapons/Assault/weapon_material.tres b/Weapons/Assault/weapon_material.tres new file mode 100644 index 0000000..c3006bb --- /dev/null +++ b/Weapons/Assault/weapon_material.tres @@ -0,0 +1,13 @@ +[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://bjdi4f801k0xt"] + +[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_r6w0r"] +[ext_resource type="Texture2D" uid="uid://u8p3xcl3gvie" path="res://Weapons/Assault/rifle_tex.png" id="2_kbuty"] + +[resource] +render_priority = 0 +shader = ExtResource("1_r6w0r") +shader_parameter/affine_mapping = true +shader_parameter/albedo = ExtResource("2_kbuty") +shader_parameter/alpha_scissor = 0.5 +shader_parameter/jitter = 0.25 +shader_parameter/resolution = Vector2i(320, 240) diff --git a/Worlds/GreenPlanet/Levels/Bridge/mat1.tres b/Worlds/GreenPlanet/Levels/Bridge/mat1.tres index 806cc30..92cb779 100644 --- a/Worlds/GreenPlanet/Levels/Bridge/mat1.tres +++ b/Worlds/GreenPlanet/Levels/Bridge/mat1.tres @@ -18,7 +18,7 @@ rim_tint = 1.0 clearcoat = 0.0 clearcoat_roughness = 1.0 detail_blend_mode = 3 -uv1_scale = Vector3(200, 200, 200) +uv1_scale = Vector3(4, 4, 4) texture_filter = 0 grow_amount = -5.818 distance_fade_min_distance = 0.1 diff --git a/Worlds/GreenPlanet/Levels/Bridge/mat2.tres b/Worlds/GreenPlanet/Levels/Bridge/mat2.tres index 3ab1e13..c2b5f42 100644 --- a/Worlds/GreenPlanet/Levels/Bridge/mat2.tres +++ b/Worlds/GreenPlanet/Levels/Bridge/mat2.tres @@ -3,6 +3,8 @@ [sub_resource type="FastNoiseLite" id="FastNoiseLite_mrvo6"] [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_ah5r4"] +width = 256 +height = 256 seamless = true as_normal_map = true noise = SubResource("FastNoiseLite_mrvo6") @@ -10,7 +12,5 @@ noise = SubResource("FastNoiseLite_mrvo6") [resource] albedo_color = Color(0.207653, 0.448041, 0.223187, 1) normal_enabled = true -normal_scale = 3.91 normal_texture = SubResource("NoiseTexture2D_ah5r4") -uv1_scale = Vector3(97.955, 97.955, 97.955) -texture_filter = 0 +texture_filter = 2 diff --git a/card_model/3d_card.gd b/card_model/3d_card.gd new file mode 100644 index 0000000..d42e383 --- /dev/null +++ b/card_model/3d_card.gd @@ -0,0 +1,13 @@ +class_name Card3D +extends Node3D + +@export var card_in_hand: CardInHand +@export var mesh: MeshInstance3D + + +func set_card(card: Card) -> void: + card_in_hand.set_card(card) + card_in_hand.view_tower() + var material: ShaderMaterial = mesh.get_surface_override_material(1) as ShaderMaterial + var gradient_tex: GradientTexture1D = material.get_shader_parameter("albedo") as GradientTexture1D + gradient_tex.gradient.colors[0] = Data.rarity_colors[card.rarity] diff --git a/card_model/3d_card.gd.uid b/card_model/3d_card.gd.uid new file mode 100644 index 0000000..03196c9 --- /dev/null +++ b/card_model/3d_card.gd.uid @@ -0,0 +1 @@ +uid://cr6hn1pbu35o1 diff --git a/card_model/3d_card.tscn b/card_model/3d_card.tscn new file mode 100644 index 0000000..3f2b8c4 --- /dev/null +++ b/card_model/3d_card.tscn @@ -0,0 +1,150 @@ +[gd_scene load_steps=14 format=4 uid="uid://n8ab1cy7ordc"] + +[ext_resource type="Script" uid="uid://cr6hn1pbu35o1" path="res://card_model/3d_card.gd" id="1_o6jcx"] +[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="2_o6jcx"] +[ext_resource type="PackedScene" uid="uid://dixtx38u4jhd7" path="res://Scenes/UI/card_hand.tscn" id="3_bnh6n"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0gfbg"] +resource_name = "Face" +cull_mode = 2 +albedo_color = Color(0.906332, 0.906332, 0.906332, 1) +roughness = 0.5 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_bdeaa"] +render_priority = 0 +shader = ExtResource("2_o6jcx") +shader_parameter/affine_mapping = true +shader_parameter/alpha_scissor = 0.5 +shader_parameter/jitter = 0.25 +shader_parameter/resolution = Vector2i(320, 240) + +[sub_resource type="ArrayMesh" id="ArrayMesh_0gfbg"] +_surfaces = [{ +"aabb": AABB(-0.0430221, -0.057516, -0.0023732, 0.0860442, 0.115032, 0.00474638), +"format": 34896613377, +"index_count": 12, +"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUA"), +"name": "Face", +"primitive": 3, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 8, +"vertex_data": PackedByteArray("AAD/////AAD//wAA//8AAAAAAAD//wAA////////AAD/////AAAAAAAAAAAAAAAA//8AAAAAAAAAAP//AAAAAA==") +}, { +"aabb": AABB(-0.0481252, -0.063314, -0.0023732, 0.0962504, 0.126628, 0.00474638), +"format": 34359742465, +"index_count": 216, +"index_data": PackedByteArray("AAABAAIAAwAAAAIAAAAEAAEABQAEAAAAAwAFAAAABQAGAAQAAwAHAAUABwAGAAUACAAEAAYACAABAAQABwAJAAYACAAGAAkACgAHAAMACgAJAAcACwABAAgACQAMAAgACgANAAkACQANAAwACgADAA4ACgAPAA0ADAANAA8ADgAQAAoACgAQAA8ADAAPABEAEAARAA8ADAARABIAEAATABEADgATABAAEwASABEADgAUABMAEwAUABIAFQAUAA4AFgAMABIAFwASABQAFQAXABQAFwAYABIAFgASABgAGQAYABcAFgAYABkAGQAXABoAFQAaABcAFgAZABsAGwAZABoAFgAbABwAGwAaAB0AFQAdABoAHAAbAB0AFQAeAB0AHAAdAB4AFQAfAB4AHAAeAB8ACwAWABwAFQAgAB8AHAAfACEACwAcACEAIgAhAB8ACwAhACIAIgAfACMAIAAjAB8ACwAiACQAJAAiACMACwAkACUACwAlAAEAJAAjACYAIAAmACMAJQAkACYAJwABACUAJQAmACcAIAAnACYAJwACAAEAIAACACcAIAADAAIA"), +"name": "Border", +"primitive": 3, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 40, +"vertex_data": PackedByteArray("amJCvRrmdT2bhxu76x5FvaR2aD2Ehxs76x5FvaR2aD2bhxu79DcwvdiVaz2bhxu7amJCvRrmdT2Ehxs7mug6vd67fz2bhxu7mug6vd67fz2Ehxs7SrIwvbmqgT2bhxu79DcwvdiVaz2Ehxs7SrIwvbmqgT2Ehxs7SrIwPbmqgT2bhxu79Dcwvd6Va72Ehxs79DcwPdiVaz2Ehxs7SrIwPbmqgT2Ehxs79DcwPdiVaz2bhxu7mug6Pd67fz2Ehxs7mug6Pd67fz2bhxu7amJCPRrmdT2Ehxs76x5FPaR2aD2Ehxs7amJCPRrmdT2bhxu76x5FPaR2aD2bhxu79DcwPd6Va72bhxu79DcwPd6Va72Ehxs76x5FPap2aL2bhxu76x5FPap2aL2Ehxs7amJCPR7mdb2Ehxs7amJCPR7mdb2bhxu7mug6PeS7f72Ehxs7SrIwPcKqgb2Ehxs7mug6PeS7f72bhxu7SrIwPcKqgb2bhxu7SrIwvcKqgb2bhxu79Dcwvd6Va72bhxu7SrIwvcKqgb2Ehxs7mug6veS7f72Ehxs7mug6veS7f72bhxu7amJCvR7mdb2Ehxs76x5Fvap2aL2Ehxs7amJCvR7mdb2bhxu76x5Fvap2aL2bhxu7") +}] +blend_shape_mode = 0 + +[sub_resource type="ArrayMesh" id="ArrayMesh_gxum5"] +resource_name = "card_model_Cube_001" +_surfaces = [{ +"aabb": AABB(-0.0430221, -0.057516, -0.0023732, 0.0860442, 0.115032, 0.00474638), +"format": 34896613377, +"index_count": 12, +"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUA"), +"name": "Face", +"primitive": 3, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 8, +"vertex_data": PackedByteArray("AAD/////AAD//wAA//8AAAAAAAD//wAA////////AAD/////AAAAAAAAAAAAAAAA//8AAAAAAAAAAP//AAAAAA==") +}, { +"aabb": AABB(-0.0481252, -0.063314, -0.0023732, 0.0962504, 0.126628, 0.00474638), +"format": 34359742465, +"index_count": 216, +"index_data": PackedByteArray("AAABAAIAAwAAAAIAAAAEAAEABQAEAAAAAwAFAAAABQAGAAQAAwAHAAUABwAGAAUACAAEAAYACAABAAQABwAJAAYACAAGAAkACgAHAAMACgAJAAcACwABAAgACQAMAAgACgANAAkACQANAAwACgADAA4ACgAPAA0ADAANAA8ADgAQAAoACgAQAA8ADAAPABEAEAARAA8ADAARABIAEAATABEADgATABAAEwASABEADgAUABMAEwAUABIAFQAUAA4AFgAMABIAFwASABQAFQAXABQAFwAYABIAFgASABgAGQAYABcAFgAYABkAGQAXABoAFQAaABcAFgAZABsAGwAZABoAFgAbABwAGwAaAB0AFQAdABoAHAAbAB0AFQAeAB0AHAAdAB4AFQAfAB4AHAAeAB8ACwAWABwAFQAgAB8AHAAfACEACwAcACEAIgAhAB8ACwAhACIAIgAfACMAIAAjAB8ACwAiACQAJAAiACMACwAkACUACwAlAAEAJAAjACYAIAAmACMAJQAkACYAJwABACUAJQAmACcAIAAnACYAJwACAAEAIAACACcAIAADAAIA"), +"name": "Border", +"primitive": 3, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 40, +"vertex_data": PackedByteArray("amJCvRrmdT2bhxu76x5FvaR2aD2Ehxs76x5FvaR2aD2bhxu79DcwvdiVaz2bhxu7amJCvRrmdT2Ehxs7mug6vd67fz2bhxu7mug6vd67fz2Ehxs7SrIwvbmqgT2bhxu79DcwvdiVaz2Ehxs7SrIwvbmqgT2Ehxs7SrIwPbmqgT2bhxu79Dcwvd6Va72Ehxs79DcwPdiVaz2Ehxs7SrIwPbmqgT2Ehxs79DcwPdiVaz2bhxu7mug6Pd67fz2Ehxs7mug6Pd67fz2bhxu7amJCPRrmdT2Ehxs76x5FPaR2aD2Ehxs7amJCPRrmdT2bhxu76x5FPaR2aD2bhxu79DcwPd6Va72bhxu79DcwPd6Va72Ehxs76x5FPap2aL2bhxu76x5FPap2aL2Ehxs7amJCPR7mdb2Ehxs7amJCPR7mdb2bhxu7mug6PeS7f72Ehxs7SrIwPcKqgb2Ehxs7mug6PeS7f72bhxu7SrIwPcKqgb2bhxu7SrIwvcKqgb2bhxu79Dcwvd6Va72bhxu7SrIwvcKqgb2Ehxs7mug6veS7f72Ehxs7mug6veS7f72bhxu7amJCvR7mdb2Ehxs76x5Fvap2aL2Ehxs7amJCvR7mdb2bhxu76x5Fvap2aL2bhxu7") +}] +blend_shape_mode = 0 +shadow_mesh = SubResource("ArrayMesh_0gfbg") + +[sub_resource type="ArrayMesh" id="ArrayMesh_4sds6"] +resource_name = "card_model_Cube_001" +_surfaces = [{ +"aabb": AABB(-0.0430221, -0.057516, -0.0023732, 0.0860442, 0.115032, 0.00474638), +"attribute_data": PackedByteArray("AAAAAP////8AAP////8AAAAAAAD/////AAD/////AAA="), +"format": 34896613399, +"index_count": 12, +"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUA"), +"material": SubResource("StandardMaterial3D_0gfbg"), +"name": "Face", +"primitive": 3, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 8, +"vertex_data": PackedByteArray("AAD/////AID//wAA//8AgAAAAAD//wCA////////AID/////AAD//wAAAAAAAP////8AAAAA//8AAP//AAD///9/////f////3////9/////f////3////9/////f///") +}, { +"aabb": AABB(-0.0481252, -0.063314, -0.0023732, 0.0962504, 0.126628, 0.00474638), +"attribute_data": PackedByteArray("mVcePwAAgD80rxw/AACAPzSvHD8AAIA/mVcePwAAgD+ZocY+AACAPzSvHD8AAIA/NK8cPwAAgD+ZocY+AACAP5mhBj4AAIA+MUMNPgAAgD6ZoQY+AACAPjFDDT4AAIA+AAAAPgAAgD6ZoQY+AACAPgAAAD4AAIA+maEGPgAAgD4AACA/AACAP5lXHj8AAIA/mVcePwAAgD8AACA/AACAPzSvXD8AAIA+AABgPwAAgD4AAGA/AACAPjSvXD8AAIA+maHGPgAAgD8AAMA+AACAP5mhxj4AAIA/AADAPgAAgD9cyIw+Tm8cPzFDDT4AAIA+maEGPgAAgD5zxow+bWwcPwAAwD4AAIA/tOOUPmBhJz+ZocY+AACAPzFDDT4AAIA+NK8cPwAAgD+hiDU/YWEnP7TjlD5gYSc/1Zw5P2xsHD+ZVx4/AACAP9+bOT9Nbxw/AABgPwAAgD5cyIw+Tm8cP5mhBj4AAIA+c8aMPm1sHD8AAMA+AACAP5mhxj4AAIA/NK8cPwAAgD+hiDU/YWEnP9WcOT9sbBw/mVcePwAAgD/fmzk/TW8cPwAAYD8AAIA+wf08P14YET80r1w/AACAPjSvXD8AAIA+wf08P14YET+ZVx4/AACAPzSvHD8AAIA/mVcePwAAgD80rxw/AACAP1zIjD5Obxw/MUMNPgAAgD4xQw0+AACAPpmhBj4AAIA+XMiMPk5vHD+ZoQY+AACAPnPGjD5tbBw/AADAPgAAgD9zxow+bWwcPwAAwD4AAIA/tOOUPmBhJz+ZocY+AACAPzSvHD8AAIA/oYg1P2FhJz/VnDk/bGwcP5lXHj8AAIA/35s5P01vHD8AAGA/AACAPsH9PD9eGBE/NK9cPwAAgD40r1w/AACAPsH9PD9eGBE/AABgPwAAgD7fmzk/TW8cP5lXHj8AAIA/1Zw5P2xsHD80rxw/AACAP7TjlD5gYSc/oYg1P2FhJz+ZocY+AACAPzFDDT4AAIA+maEGPgAAgD4xQw0+AACAPpmhBj4AAIA+maEGPgAAgD4AAAA+AACAPpmhBj4AAIA+AAAAPgAAgD4AACA/AACAP5lXHj8AAIA/AAAgPwAAgD+ZVx4/AACAPzSvXD8AAIA+AABgPwAAgD40r1w/AACAPgAAYD8AAIA+AADAPgAAgD+ZocY+AACAPwAAwD4AAIA/maHGPgAAgD+ZocY+AACAPzSvHD8AAIA/maHGPgAAgD80rxw/AACAPzFDDT4AAIA+MUMNPgAAgD4xQw0+AACAPjFDDT4AAIA+NK9cPwAAgD40r1w/AACAPjSvXD8AAIA+NK9cPwAAgD4="), +"format": 34359742487, +"index_count": 216, +"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUACAAJAAoACAALAAkADAANAA4ADAAPAA0AEAARABIAEAATABEAFAAVABYAFAAXABUAGAAZABoAGAAbABkAHAAdAB4AHwAeACAAIQAgACIAIQAjAB0AIQAiACQAIQAkACUAIQAmACMAJwAkACgAKQAoACoAKwAsACMALQAuACwAJgAvAC4AJgAwAC8AJgAxADAAMgAzADAANAA1ADMANgA3ADUAOAA3ADYAOAA2ACUAOQAqADgAOgA7ADwAOgA9ADsAPgA/AEAAPgBAAEEAPgBCAD8AQgBDAD8ARABFAEMARgBBAEcASABJAEUASABKAEkASABLAEoATABNAEoATgBPAE0AUABRAE8AUgBRAFAAUgBQAFMAUwBUAFIAVQBWAFQAVwBYAFYAWQBYAFoAWQBbAFgAWQBHAFsAXABdAF4AXABfAF0AYABhAGIAYABjAGEAZABlAGYAZABnAGUAaABpAGoAaABrAGkAbABtAG4AbABvAG0AcABxAHIAcABzAHEAdAB1AHYAdAB3AHUAeAB5AHoAeAB7AHkA"), +"material": SubResource("ShaderMaterial_bdeaa"), +"name": "Border", +"primitive": 3, +"uv_scale": Vector4(0, 0, 0, 0), +"vertex_count": 124, +"vertex_data": PackedByteArray("amJCvRrmdT2bhxu76x5FvaR2aD2Ehxs76x5FvaR2aD2bhxu7amJCvRrmdT2Ehxs76x5FPap2aL2bhxu76x5FPaR2aD2Ehxs76x5FPaR2aD2bhxu76x5FPap2aL2Ehxs7mug6veS7f72Ehxs7SrIwvcKqgb2bhxu7mug6veS7f72bhxu7SrIwvcKqgb2Ehxs7amJCvR7mdb2Ehxs7mug6veS7f72bhxu7amJCvR7mdb2bhxu7mug6veS7f72Ehxs7mug6vd67fz2bhxu7amJCvRrmdT2Ehxs7amJCvRrmdT2bhxu7mug6vd67fz2Ehxs7SrIwvbmqgT2bhxu7mug6vd67fz2Ehxs7mug6vd67fz2bhxu7SrIwvbmqgT2Ehxs76x5Fvap2aL2Ehxs7amJCvR7mdb2bhxu76x5Fvap2aL2bhxu7amJCvR7mdb2Ehxs79Dcwvd6Va72Ehxs7SrIwvcKqgb2Ehxs7mug6veS7f72Ehxs79Dcwvd6Va72Ehxs7amJCvR7mdb2Ehxs79Dcwvd6Va72Ehxs76x5Fvap2aL2Ehxs7SrIwPcKqgb2Ehxs76x5FvaR2aD2Ehxs79DcwvdiVaz2Ehxs79DcwPd6Va72Ehxs79DcwvdiVaz2Ehxs7amJCvRrmdT2Ehxs79DcwvdiVaz2Ehxs7mug6vd67fz2Ehxs79DcwPd6Va72Ehxs7mug6PeS7f72Ehxs79DcwPd6Va72Ehxs7amJCPR7mdb2Ehxs76x5FPap2aL2Ehxs76x5FPaR2aD2Ehxs79DcwPdiVaz2Ehxs79DcwPdiVaz2Ehxs7amJCPRrmdT2Ehxs79DcwPdiVaz2Ehxs7mug6Pd67fz2Ehxs79DcwPdiVaz2Ehxs7SrIwPbmqgT2Ehxs7SrIwvbmqgT2Ehxs79DcwvdiVaz2Ehxs7amJCPRrmdT2bhxu76x5FPaR2aD2Ehxs7amJCPRrmdT2Ehxs76x5FPaR2aD2bhxu79DcwPd6Va72bhxu7SrIwvcKqgb2bhxu7SrIwPcKqgb2bhxu7mug6PeS7f72bhxu79Dcwvd6Va72bhxu7mug6veS7f72bhxu79Dcwvd6Va72bhxu7amJCvR7mdb2bhxu79DcwPd6Va72bhxu7amJCPR7mdb2bhxu79Dcwvd6Va72bhxu76x5Fvap2aL2bhxu76x5FvaR2aD2bhxu79DcwvdiVaz2bhxu79DcwvdiVaz2bhxu7amJCvRrmdT2bhxu79DcwvdiVaz2bhxu7mug6vd67fz2bhxu79DcwvdiVaz2bhxu7SrIwvbmqgT2bhxu7SrIwPbmqgT2bhxu79DcwPdiVaz2bhxu7mug6Pd67fz2bhxu79DcwPdiVaz2bhxu7amJCPRrmdT2bhxu79DcwPdiVaz2bhxu76x5FPaR2aD2bhxu79DcwPd6Va72bhxu79DcwPdiVaz2bhxu76x5FPap2aL2bhxu7SrIwPcKqgb2Ehxs7mug6PeS7f72bhxu7SrIwPcKqgb2bhxu7mug6PeS7f72Ehxs7mug6PeS7f72Ehxs7amJCPR7mdb2bhxu7mug6PeS7f72bhxu7amJCPR7mdb2Ehxs7mug6Pd67fz2bhxu7amJCPRrmdT2Ehxs7mug6Pd67fz2Ehxs7amJCPRrmdT2bhxu7SrIwPbmqgT2bhxu7mug6Pd67fz2Ehxs7SrIwPbmqgT2Ehxs7mug6Pd67fz2bhxu7amJCPR7mdb2Ehxs76x5FPap2aL2bhxu7amJCPR7mdb2bhxu76x5FPap2aL2Ehxs76x5Fvap2aL2bhxu76x5FvaR2aD2Ehxs76x5Fvap2aL2Ehxs76x5FvaR2aD2bhxu7SrIwPcKqgb2Ehxs7SrIwvcKqgb2bhxu7SrIwvcKqgb2Ehxs7SrIwPcKqgb2bhxu7SrIwPbmqgT2bhxu7SrIwvbmqgT2Ehxs7SrIwvbmqgT2bhxu7SrIwPbmqgT2Ehxs7qRWolf///7+pFaiV////v6kVqJX///+/qRWolf///7////9/////v////3////+/////f////7////9/////v6JeXSH///+/ol5dIf///7+iXl0h////v6JeXSH///+/Rje5SP///79GN7lI////v0Y3uUj///+/Rje5SP///79GN0W3////v0Y3Rbf///+/RjdFt////79GN0W3////v6Jeod7///+/ol6h3v///7+iXqHe////v6Jeod7///+/qRVWav///7+pFVZq////v6kVVmr///+/qRVWav///7//f/9/ot6uUP9//3////8//3//f5K9yR7/f/9/kr3JHv9//39XatQK/3//f////z//f/9/H3bwBP9//3////8//3//f/9/AAD/f/9/1QEVP/9//3////8//3//f6eV1Ar/f/9/p5XUCv9//39sQske/3//f2xCyR7/f/9/XCFQr/9//39sQjXh/3//f2xCNeH/f/9/p5Uq9f9//3/fiQ77/3//f/9/////f/9//3////9//39Xair1/3//f1dqKvX/f/9/kr014f9//3+SvTXh/3//f6LeUa//f/9/ot5Rr/9//3////8//3//f1whrVBV6qiV////v1XqqJX///+/Veqolf///79V6qiV////v/////9cIa5Q/////6LeUK//////XCGuUP////9sQske/////6LeUK//////kr014f////+SvTXh/////1dqKvX/////bELJHv////+nldQK/////014Jvz/////H3YO+///////f/////////9/////////p5Uq9f////+nlSr1/////2xCNeH/////bEI14f////9cIVGv/////1whUa//////ot6tUP////+i3q1Q/////5K9yR7/////kr3JHv////9XatQK/////1dq1Ar//////38AAP////+xh9gD//////9/AAD/////34nwBFyhXSH///+/XKFdIf///79coV0h////v1yhXSH///+/uMi5SP///7+4yLlI////v7jIuUj///+/uMi5SP///7+4yEW3////v7jIRbf///+/uMhFt////7+4yEW3////v1yhod7///+/XKGh3v///79coaHe////v1yhod7///+/VepWav///79V6lZq////v1XqVmr///+/VepWav///78AAP9/////vwAA/3////+/AAD/f////78AAP9/////v/9/AAD///+//38AAP///7//fwAA////v/9/AAD///+//3///////7//f///////v/9///////+//3///////78=") +}] +blend_shape_mode = 0 +shadow_mesh = SubResource("ArrayMesh_gxum5") + +[sub_resource type="ViewportTexture" id="ViewportTexture_bm66m"] +viewport_path = NodePath("SubViewport") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ld374"] +resource_local_to_scene = true +render_priority = 0 +shader = ExtResource("2_o6jcx") +shader_parameter/affine_mapping = false +shader_parameter/albedo = SubResource("ViewportTexture_bm66m") +shader_parameter/alpha_scissor = 0.5 +shader_parameter/jitter = 0.25 +shader_parameter/resolution = Vector2i(320, 240) + +[sub_resource type="Gradient" id="Gradient_bvqyy"] +resource_local_to_scene = true +offsets = PackedFloat32Array(0) +colors = PackedColorArray(0.844882, 0.457393, 0.0915536, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_8q1at"] +gradient = SubResource("Gradient_bvqyy") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_cuxkc"] +resource_local_to_scene = true +render_priority = 0 +shader = ExtResource("2_o6jcx") +shader_parameter/affine_mapping = true +shader_parameter/albedo = SubResource("GradientTexture1D_8q1at") +shader_parameter/alpha_scissor = 0.5 +shader_parameter/jitter = 0.25 +shader_parameter/resolution = Vector2i(320, 240) + +[node name="3DCard" type="Node3D" node_paths=PackedStringArray("card_in_hand", "mesh")] +script = ExtResource("1_o6jcx") +card_in_hand = NodePath("SubViewport/Node2D") +mesh = NodePath("card_model/Cube") + +[node name="card_model" type="Node3D" parent="."] + +[node name="Cube" type="MeshInstance3D" parent="card_model"] +layers = 2 +mesh = SubResource("ArrayMesh_4sds6") +skeleton = NodePath("") +surface_material_override/0 = SubResource("ShaderMaterial_ld374") +surface_material_override/1 = SubResource("ShaderMaterial_cuxkc") + +[node name="SubViewport" type="SubViewport" parent="."] +size = Vector2i(304, 448) + +[node name="Node2D" parent="SubViewport" instance=ExtResource("3_bnh6n")] +position = Vector2(-80, -32) diff --git a/card_model/card_model.glb b/card_model/card_model.glb new file mode 100644 index 0000000..d51f40e Binary files /dev/null and b/card_model/card_model.glb differ diff --git a/card_model/card_model.glb.import b/card_model/card_model.glb.import new file mode 100644 index 0000000..2b7aeb5 --- /dev/null +++ b/card_model/card_model.glb.import @@ -0,0 +1,48 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bm84qm4ptokvx" +path="res://.godot/imported/card_model.glb-2dd25ed08972c3379fe54b3ea09aa18a.scn" + +[deps] + +source_file="res://card_model/card_model.glb" +dest_files=["res://.godot/imported/card_model.glb-2dd25ed08972c3379fe54b3ea09aa18a.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={ +"materials": { +"Border": { +"use_external/enabled": true, +"use_external/path": "uid://f6unr8gjnrpd" +}, +"Face": { +"use_external/enabled": false, +"use_external/path": "uid://c0qtaa5n5le7g" +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/left_hand/card_hand_model.glb b/left_hand/card_hand_model.glb new file mode 100644 index 0000000..0c7078b Binary files /dev/null and b/left_hand/card_hand_model.glb differ diff --git a/left_hand/card_hand_model.glb.import b/left_hand/card_hand_model.glb.import new file mode 100644 index 0000000..472d452 --- /dev/null +++ b/left_hand/card_hand_model.glb.import @@ -0,0 +1,44 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://ckl5tw5rmewhp" +path="res://.godot/imported/card_hand_model.glb-9d079553923f873c0bdaf334fc6f8b8b.scn" + +[deps] + +source_file="res://left_hand/card_hand_model.glb" +dest_files=["res://.godot/imported/card_hand_model.glb-9d079553923f873c0bdaf334fc6f8b8b.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={ +"materials": { +"Default": { +"use_external/enabled": true, +"use_external/path": "uid://cmrs1ubeqtl71" +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/left_hand/left_hand_mat.tres b/left_hand/left_hand_mat.tres new file mode 100644 index 0000000..78293a4 --- /dev/null +++ b/left_hand/left_hand_mat.tres @@ -0,0 +1,14 @@ +[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://cmrs1ubeqtl71"] + +[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_bpyoj"] + +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_6krsv"] + +[resource] +render_priority = 0 +shader = ExtResource("1_bpyoj") +shader_parameter/affine_mapping = true +shader_parameter/albedo = SubResource("PlaceholderTexture2D_6krsv") +shader_parameter/alpha_scissor = 0.5 +shader_parameter/jitter = 0.25 +shader_parameter/resolution = Vector2i(320, 240) diff --git a/project.godot b/project.godot index 9b2f392..6ae6c5c 100644 --- a/project.godot +++ b/project.godot @@ -154,6 +154,31 @@ Pause={ "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":4,"canceled":false,"pressed":false,"double_click":false,"script":null) ] } +"Select 1st Card"={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null) +] +} +"Select 2nd Card"={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null) +] +} +"Select 3rd Card"={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null) +] +} +"Select 4th Card"={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":52,"key_label":0,"unicode":52,"location":0,"echo":false,"script":null) +] +} +"Select 5th Card"={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":53,"key_label":0,"unicode":53,"location":0,"echo":false,"script":null) +] +} [layer_names]