update buildmanager
This commit is contained in:
@@ -3,25 +3,26 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://boomg3nx6bcqy"
|
||||
path="res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.ctex"
|
||||
path.s3tc="res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Blends/Pot/brick.jpg"
|
||||
dest_files=["res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.ctex"]
|
||||
dest_files=["res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -31,4 +32,4 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Blends/Pot/pot_uv.jpg
Normal file
BIN
Blends/Pot/pot_uv.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
35
Blends/Pot/pot_uv.jpg.import
Normal file
35
Blends/Pot/pot_uv.jpg.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://8qyuw0q5luju"
|
||||
path.s3tc="res://.godot/imported/pot_uv.jpg-c3f5f910b203bcfdf16fec6b59103278.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Blends/Pot/pot_uv.jpg"
|
||||
dest_files=["res://.godot/imported/pot_uv.jpg-c3f5f910b203bcfdf16fec6b59103278.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,4 +1,4 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://bcme5mx8nf5kf"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://bcme5mx8nf5kf"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c61rr6to3q566" path="res://Scripts/build_object.gd" id="1_c5d30"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dqs5joeucls8u" path="res://Blends/Pot/pot.obj" id="1_ps8qt"]
|
||||
@@ -7,6 +7,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://fom8shxpn476" path="res://Blends/Pot/pot_brick.jpg" id="3_ocdig"]
|
||||
[ext_resource type="Texture2D" uid="uid://bw8k6hmfrwj60" path="res://Blends/Pot/rougness_m.png" id="4_vv7mx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cdb7b2ef31ixv" path="res://Blends/Pot/pot_wood.jpg" id="5_gtq0i"]
|
||||
[ext_resource type="Texture2D" uid="uid://8qyuw0q5luju" path="res://Blends/Pot/pot_uv.jpg" id="5_vv7mx"]
|
||||
[ext_resource type="Texture2D" uid="uid://bxgm6oovlxdjq" path="res://Blends/Pot/wood_n.png" id="6_r71lq"]
|
||||
[ext_resource type="Texture2D" uid="uid://run700pxmcyc" path="res://Blends/Pot/brick_t.png" id="7_e7ek7"]
|
||||
|
||||
@@ -22,6 +23,9 @@ roughness_texture = ExtResource("4_vv7mx")
|
||||
normal_enabled = true
|
||||
normal_scale = -2.6
|
||||
normal_texture = ExtResource("3_ocdig")
|
||||
detail_albedo = ExtResource("5_vv7mx")
|
||||
detail_normal = ExtResource("3_ocdig")
|
||||
uv1_scale = Vector3(0.5, 0.4, 1)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_uhv8u"]
|
||||
albedo_texture = ExtResource("5_gtq0i")
|
||||
|
||||
@@ -3,14 +3,18 @@ extends Node
|
||||
@onready var DoubleBeds = preload("res://Scenes/Prefabs/DoubleBeds.tscn")
|
||||
@onready var Pot = preload("res://Scenes/Prefabs/Pot.tscn")
|
||||
|
||||
var selected_object_id: int
|
||||
signal build_object_selected
|
||||
|
||||
|
||||
var selected_object_id: int
|
||||
var is_object_selected: bool
|
||||
|
||||
var global_y = 2.903
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
print(DoubleBeds)
|
||||
is_object_selected = false
|
||||
build_object_selected.connect(_on_object_selected)
|
||||
|
||||
func get_preview_object():
|
||||
var selected_object
|
||||
@@ -20,3 +24,7 @@ func get_preview_object():
|
||||
1:
|
||||
selected_object = Pot
|
||||
return selected_object
|
||||
|
||||
|
||||
func _on_object_selected():
|
||||
is_object_selected = true
|
||||
|
||||
@@ -23,7 +23,7 @@ func _input_event(camera: Camera3D, event: InputEvent, event_position: Vector3,
|
||||
|
||||
|
||||
func _mouse_enter() -> void:
|
||||
if !is_placed and Global.build_mode:
|
||||
if !is_placed and Global.build_mode and BuildManager.is_object_selected:
|
||||
show_preview()
|
||||
|
||||
func _mouse_exit() -> void:
|
||||
|
||||
@@ -3,8 +3,12 @@ extends Button
|
||||
|
||||
@export var id: int
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_pressed() -> void:
|
||||
BuildManager.selected_object_id = id
|
||||
BuildManager.build_object_selected.emit()
|
||||
print(BuildManager.selected_object_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user