first Prototype
This commit is contained in:
parent
e11825c698
commit
35ce267482
481 changed files with 17315 additions and 1 deletions
14
scenes/camera/UI/card.gd
Normal file
14
scenes/camera/UI/card.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class_name Card extends CenterContainer
|
||||
|
||||
@onready var itemButton = $ItemButton
|
||||
@onready var ItemAmountLabel = $ItemButton/ItemAmountLabel
|
||||
|
||||
@export var itemType: GLOBALS.ITEMTYPES = GLOBALS.ITEMTYPES.STANDARDBULLET
|
||||
|
||||
signal selected(_itemType: GLOBALS.ITEMTYPES)
|
||||
|
||||
func _on_item_button_pressed() -> void:
|
||||
selected.emit(itemType)
|
||||
|
||||
func setAmount(amount: int) -> void:
|
||||
ItemAmountLabel.text = str(amount)
|
||||
1
scenes/camera/UI/card.gd.uid
Normal file
1
scenes/camera/UI/card.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://culacsksqcquo
|
||||
39
scenes/camera/UI/card.tscn
Normal file
39
scenes/camera/UI/card.tscn
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://bc84ynsnwc1ew"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bprr1g5mf44sm" path="res://assets/cards/cardPlaceholder.png" id="1_fobdo"]
|
||||
[ext_resource type="Script" uid="uid://culacsksqcquo" path="res://scenes/camera/UI/card.gd" id="1_wa0td"]
|
||||
[ext_resource type="Texture2D" uid="uid://cmnnfrkp1h5s0" path="res://assets/cards/bullet.png" id="2_wa0td"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_qr7cc"]
|
||||
texture = ExtResource("1_fobdo")
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_6m2n3"]
|
||||
font_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Card" type="CenterContainer"]
|
||||
script = ExtResource("1_wa0td")
|
||||
|
||||
[node name="ItemButton" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
tooltip_auto_translate_mode = 1
|
||||
theme_override_styles/normal = SubResource("StyleBoxTexture_qr7cc")
|
||||
icon = ExtResource("2_wa0td")
|
||||
|
||||
[node name="ItemAmountLabel" type="Label" parent="ItemButton"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -48.0
|
||||
offset_top = -30.0
|
||||
offset_right = -8.0
|
||||
offset_bottom = -7.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
text = "1"
|
||||
label_settings = SubResource("LabelSettings_6m2n3")
|
||||
horizontal_alignment = 2
|
||||
|
||||
[connection signal="pressed" from="ItemButton" to="." method="_on_item_button_pressed"]
|
||||
7
scenes/camera/UI/playerSelectionButton.gd
Normal file
7
scenes/camera/UI/playerSelectionButton.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends CheckBox
|
||||
|
||||
var player: Player
|
||||
|
||||
func setPlayer(_player: Player) -> void:
|
||||
text = _player.gameName
|
||||
player = _player
|
||||
1
scenes/camera/UI/playerSelectionButton.gd.uid
Normal file
1
scenes/camera/UI/playerSelectionButton.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c0elwhiqu20i8
|
||||
8
scenes/camera/UI/playerSelectionButton.tscn
Normal file
8
scenes/camera/UI/playerSelectionButton.tscn
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://lsg8l7r66uyr"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c0elwhiqu20i8" path="res://scenes/camera/UI/playerSelectionButton.gd" id="1_scfyp"]
|
||||
|
||||
[node name="playerSelectionButton" type="CheckBox"]
|
||||
offset_right = 24.0
|
||||
offset_bottom = 24.0
|
||||
script = ExtResource("1_scfyp")
|
||||
93
scenes/camera/camera.gd
Normal file
93
scenes/camera/camera.gd
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
extends Camera3D
|
||||
|
||||
@onready var playerSelectButton = preload("res://scenes/camera/UI/playerSelectionButton.tscn")
|
||||
|
||||
@onready var roundLabel = $CanvasLayer/Control/General/roundLabel
|
||||
@onready var playerNameLabel = $CanvasLayer/Control/Player/PlayerNameLabel
|
||||
@onready var itemCards = $CanvasLayer/Control/Player/ItemCards
|
||||
@onready var magazineLabel = $CanvasLayer/Control/Player/MagazineLabel
|
||||
@onready var playerSelection = $CanvasLayer/Control/Player/PlayerSelection
|
||||
|
||||
#@onready var itemStandardBulletButton = $
|
||||
var currentPlayer: Player
|
||||
var selectablePlayers: Array[Player]
|
||||
|
||||
signal itemSelected(_itemType: GLOBALS.ITEMTYPES)
|
||||
signal nextTurn()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for i in itemCards.get_children():
|
||||
if i.has_signal("selected"):
|
||||
i.selected.connect(selectItem.bind())
|
||||
|
||||
func setRound(_round: int) -> void:
|
||||
roundLabel.text = str(_round)
|
||||
|
||||
func updatePlayerStats():
|
||||
playerNameLabel.text = str(currentPlayer.getGameName())
|
||||
magazineLabel.text = str(currentPlayer.gun.magazineSize) + "/" + str(currentPlayer.gun.getBulletAmount())
|
||||
updatePlayerSelection()
|
||||
updateItemCards()
|
||||
|
||||
func setCurrentPlayer(_currentPlayer: Player):
|
||||
currentPlayer = _currentPlayer
|
||||
updatePlayerStats()
|
||||
|
||||
func selectItem(_itemType: GLOBALS.ITEMTYPES):
|
||||
print(currentPlayer.gun.magazineSizeLeft())
|
||||
if currentPlayer.gun.magazineSizeLeft() > 0:
|
||||
itemSelected.emit(_itemType)
|
||||
|
||||
func updateItemCards() -> void:
|
||||
if currentPlayer.gun.magazineSizeLeft() <= 0:
|
||||
for i in itemCards.get_children():
|
||||
if i.has_node("ItemButton"):
|
||||
i.itemButton.disabled = true
|
||||
else:
|
||||
for i in itemCards.get_children():
|
||||
if i.has_node("ItemButton"):
|
||||
i.itemButton.disabled = false
|
||||
for i in GLOBALS.ITEMTYPES:
|
||||
var counter = 0
|
||||
for j in currentPlayer.getItems():
|
||||
if j.type == GLOBALS.ITEMTYPES[i]:
|
||||
counter += 1
|
||||
for j in itemCards.get_children():
|
||||
if j.has_node("ItemButton/ItemAmountLabel") and j.itemType == GLOBALS.ITEMTYPES[i]:
|
||||
j.setAmount(counter)
|
||||
if counter <= 0:
|
||||
j.visible = false
|
||||
else:
|
||||
j.visible = true
|
||||
|
||||
|
||||
func updatePlayerSelection() -> void:
|
||||
for i in playerSelection.get_children():
|
||||
i.free()
|
||||
var newButtonGroup = ButtonGroup.new()
|
||||
for i in selectablePlayers:
|
||||
if i != currentPlayer:
|
||||
var newSelection = playerSelectButton.instantiate()
|
||||
newSelection.setPlayer(i)
|
||||
newSelection.button_group = newButtonGroup
|
||||
playerSelection.add_child(newSelection)
|
||||
|
||||
playerSelection.get_child(0).button_pressed = true
|
||||
var newSelection = playerSelectButton.instantiate()
|
||||
newSelection.setPlayer(currentPlayer)
|
||||
newSelection.button_group = newButtonGroup
|
||||
playerSelection.add_child(newSelection)
|
||||
|
||||
|
||||
|
||||
func _on_next_turn_button_pressed() -> void:
|
||||
currentPlayer.selectPlayer(getPlayerSelection())
|
||||
nextTurn.emit()
|
||||
|
||||
|
||||
func getPlayerSelection() -> Player:
|
||||
for i in playerSelection.get_children():
|
||||
if i.button_pressed == true:
|
||||
return i.player
|
||||
return currentPlayer
|
||||
1
scenes/camera/camera.gd.uid
Normal file
1
scenes/camera/camera.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bvkbh5ngdd0dt
|
||||
120
scenes/camera/camera.tscn
Normal file
120
scenes/camera/camera.tscn
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://ct45lmxlrkhaj"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvkbh5ngdd0dt" path="res://scenes/camera/camera.gd" id="1_xejhd"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc84ynsnwc1ew" path="res://scenes/camera/UI/card.tscn" id="2_6m2n3"]
|
||||
|
||||
[node name="Camera3D" type="Camera3D"]
|
||||
current = true
|
||||
script = ExtResource("1_xejhd")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Control" type="Control" parent="CanvasLayer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="General" type="Control" parent="CanvasLayer/Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="roundLabel" type="Label" parent="CanvasLayer/Control/General"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -32.0
|
||||
offset_top = 16.0
|
||||
offset_right = -22.0
|
||||
offset_bottom = 39.0
|
||||
grow_horizontal = 0
|
||||
text = "0"
|
||||
|
||||
[node name="Player" type="Control" parent="CanvasLayer/Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="PlayerNameLabel" type="Label" parent="CanvasLayer/Control/Player"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -24.0
|
||||
offset_top = 16.0
|
||||
offset_right = 24.0
|
||||
offset_bottom = 39.0
|
||||
grow_horizontal = 2
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="nextTurnButton" type="Button" parent="CanvasLayer/Control/Player"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -96.0
|
||||
offset_top = -48.0
|
||||
offset_right = -17.0
|
||||
offset_bottom = -17.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
text = "Continue"
|
||||
|
||||
[node name="ItemCards" type="HBoxContainer" parent="CanvasLayer/Control/Player"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 16.0
|
||||
offset_top = -136.0
|
||||
offset_right = 112.0
|
||||
offset_bottom = -10.0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Card" parent="CanvasLayer/Control/Player/ItemCards" instance=ExtResource("2_6m2n3")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Card2" parent="CanvasLayer/Control/Player/ItemCards" instance=ExtResource("2_6m2n3")]
|
||||
layout_mode = 2
|
||||
itemType = 2
|
||||
|
||||
[node name="MagazineLabel" type="Label" parent="CanvasLayer/Control/Player"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 16.0
|
||||
offset_top = -184.0
|
||||
offset_right = 56.0
|
||||
offset_bottom = -161.0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="PlayerSelection" type="VBoxContainer" parent="CanvasLayer/Control/Player"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -64.0
|
||||
offset_top = -20.0
|
||||
offset_right = -24.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
alignment = 1
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/Control/Player/nextTurnButton" to="." method="_on_next_turn_button_pressed"]
|
||||
10
scenes/character/character.gd
Normal file
10
scenes/character/character.gd
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class_name Character extends Node3D
|
||||
|
||||
@onready var shots = $Shots
|
||||
|
||||
func shoot():
|
||||
pass
|
||||
|
||||
func removeShot() -> void:
|
||||
print("remove Shot")
|
||||
shots.get_child(0).queue_free()
|
||||
1
scenes/character/character.gd.uid
Normal file
1
scenes/character/character.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://1uwdiveyijuu
|
||||
37
scenes/character/character.tscn
Normal file
37
scenes/character/character.tscn
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dlsh4dfqgtvan"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://du3d2gb1rri4t" path="res://icon.svg" id="1_6nn2t"]
|
||||
[ext_resource type="Script" uid="uid://1uwdiveyijuu" path="res://scenes/character/character.gd" id="1_cuyo6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhr8ggg3suw46" path="res://scenes/character/shotGlas/shotGlas.tscn" id="3_mutn8"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cuyo6"]
|
||||
albedo_texture = ExtResource("1_6nn2t")
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_mutn8"]
|
||||
material = SubResource("StandardMaterial3D_cuyo6")
|
||||
size = Vector2(1, 1)
|
||||
orientation = 2
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_cuyo6"]
|
||||
|
||||
[node name="Character" type="Node3D"]
|
||||
script = ExtResource("1_cuyo6")
|
||||
|
||||
[node name="Character" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4, -1.2)
|
||||
mesh = SubResource("PlaneMesh_mutn8")
|
||||
|
||||
[node name="Chair" type="CSGMesh3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, -1.2)
|
||||
mesh = SubResource("BoxMesh_cuyo6")
|
||||
|
||||
[node name="Shots" type="Node3D" parent="."]
|
||||
|
||||
[node name="ShotGlas3" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.3, 1.1, -0.8)
|
||||
|
||||
[node name="ShotGlas2" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, -0.8)
|
||||
|
||||
[node name="ShotGlas" parent="Shots" instance=ExtResource("3_mutn8")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3, 1.1, -0.8)
|
||||
19
scenes/character/shotGlas/shotGlas.tscn
Normal file
19
scenes/character/shotGlas/shotGlas.tscn
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bhr8ggg3suw46"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://du3d2gb1rri4t" path="res://icon.svg" id="1_k57fi"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tfdbf"]
|
||||
albedo_texture = ExtResource("1_k57fi")
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_ix4wg"]
|
||||
material = SubResource("StandardMaterial3D_tfdbf")
|
||||
size = Vector2(0.2, 0.2)
|
||||
|
||||
[node name="ShotGlas" type="Node3D"]
|
||||
|
||||
[node name="Front" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("QuadMesh_ix4wg")
|
||||
|
||||
[node name="Back" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
mesh = SubResource("QuadMesh_ix4wg")
|
||||
100
scenes/game/game.gd
Normal file
100
scenes/game/game.gd
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
extends Node3D
|
||||
|
||||
@onready var characterScene = preload("res://scenes/character/character.tscn")
|
||||
|
||||
@onready var camera = $cameraRottion/Camera3D
|
||||
@onready var charactersContainer = $CharactersContainer
|
||||
|
||||
var players: Array[Player]
|
||||
var selectablePlayers: Array[Player] = players.duplicate()
|
||||
var guns: Array[Gun]
|
||||
var roundCount: int = 0
|
||||
var playerCount: int = 2
|
||||
var lastCharacterRotation: int = 0
|
||||
var rotationInterval: float = 360 / playerCount
|
||||
var currentPlayer: Player
|
||||
var currentPlayerIndex: int = 0
|
||||
|
||||
func _ready() -> void:
|
||||
camera.itemSelected.connect(selectItem.bind())
|
||||
camera.nextTurn.connect(nextTurn.bind())
|
||||
addNewPlayer("Test 1")
|
||||
addNewPlayer("Test 2")
|
||||
players[1].bot = true
|
||||
players[0].addItem(StandardBullet.new())
|
||||
players[0].addItem(LuckyBullet.new())
|
||||
nextRound()
|
||||
nextTurn()
|
||||
|
||||
func nextTurn():
|
||||
if currentPlayerIndex + 1 > selectablePlayers.size():
|
||||
print("Shoot")
|
||||
currentPlayerIndex = 0
|
||||
givePlayersRandomGun()
|
||||
shootPlayers()
|
||||
else:
|
||||
currentPlayer = selectablePlayers[currentPlayerIndex]
|
||||
currentPlayerIndex += 1
|
||||
#if not currentPlayer.bot:
|
||||
camera.setCurrentPlayer(currentPlayer)
|
||||
|
||||
func addNewPlayer(_name: String):
|
||||
var newGun = Gun.new()
|
||||
guns.append(newGun)
|
||||
var newCharacter = addCharacter()
|
||||
var newPlayer = Player.new(_name, newGun, newCharacter)
|
||||
players.append(newPlayer)
|
||||
selectablePlayers.append(newPlayer)
|
||||
camera.selectablePlayers = selectablePlayers
|
||||
newPlayer.dead.connect(playerDied.bind())
|
||||
|
||||
func addCharacter() -> Character:
|
||||
var newCharacter = characterScene.instantiate()
|
||||
charactersContainer.add_child(newCharacter)
|
||||
lastCharacterRotation += rotationInterval
|
||||
newCharacter.rotation_degrees.y += lastCharacterRotation
|
||||
return newCharacter
|
||||
|
||||
|
||||
func playerDied(_player: Player) -> void:
|
||||
selectablePlayers.erase(_player)
|
||||
camera.selectablePlayers = selectablePlayers
|
||||
print("Player " + _player.getGameName() + " is dead")
|
||||
|
||||
func givePlayersRandomGun():
|
||||
randomize()
|
||||
var gunPool = guns.duplicate()
|
||||
for i in guns.size():
|
||||
var newGun = gunPool.pick_random()
|
||||
selectablePlayers[i].giveGun(newGun)
|
||||
gunPool.erase(newGun)
|
||||
|
||||
func givePlayersGun():
|
||||
for i in guns:
|
||||
i.mainOwner.giveGun(i)
|
||||
i.mainOwner.gun.resetMagazine()
|
||||
|
||||
func nextRound() -> void:
|
||||
givePlayersGun()
|
||||
for i in players:
|
||||
i.addItem(StandardBullet.new())
|
||||
roundCount += 1
|
||||
camera.setRound(roundCount)
|
||||
currentPlayerIndex = 0
|
||||
|
||||
func shootPlayers():
|
||||
for i in selectablePlayers:
|
||||
i.shootAtSelectedPlayer()
|
||||
nextRound()
|
||||
nextTurn()
|
||||
|
||||
func selectItem(_itemType: GLOBALS.ITEMTYPES):
|
||||
playerUseItemType(currentPlayer, _itemType)
|
||||
print(_itemType)
|
||||
|
||||
func playerUseItemType(_player: Player, _type: GLOBALS.ITEMTYPES) -> void:
|
||||
for i in currentPlayer.getItems():
|
||||
if i.type == _type:
|
||||
currentPlayer.useItem(i)
|
||||
break
|
||||
camera.updatePlayerStats()
|
||||
1
scenes/game/game.gd.uid
Normal file
1
scenes/game/game.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ylobnrrhfy5j
|
||||
25
scenes/game/game.tscn
Normal file
25
scenes/game/game.tscn
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://y6lc82qrb1e2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ylobnrrhfy5j" path="res://scenes/game/game.gd" id="1_sul5r"]
|
||||
[ext_resource type="PackedScene" uid="uid://rch2yvsj0pdn" path="res://scenes/room/room.tscn" id="2_7h61r"]
|
||||
[ext_resource type="PackedScene" uid="uid://ct45lmxlrkhaj" path="res://scenes/camera/camera.tscn" id="4_kelw5"]
|
||||
|
||||
[node name="Game" type="Node3D"]
|
||||
script = ExtResource("1_sul5r")
|
||||
|
||||
[node name="Room" parent="." instance=ExtResource("2_7h61r")]
|
||||
|
||||
[node name="CharactersContainer" type="Node3D" parent="."]
|
||||
|
||||
[node name="light" type="Node3D" parent="."]
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="light"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.52843, 0)
|
||||
omni_range = 10.5
|
||||
|
||||
[node name="cameraRottion" type="Node3D" parent="."]
|
||||
|
||||
[node name="Camera3D" parent="cameraRottion" instance=ExtResource("4_kelw5")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51089, 1.46703)
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="cameraRottion/Camera3D"]
|
||||
41
scenes/room/room.tscn
Normal file
41
scenes/room/room.tscn
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://rch2yvsj0pdn"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dv575ijvfdu7s" path="res://addons/kenney_prototype_textures/dark/texture_13.png" id="1_8xru0"]
|
||||
[ext_resource type="Material" uid="uid://vxxgydkoi8qp" path="res://scenes/room/table.tres" id="2_kxljb"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_kxljb"]
|
||||
size = Vector3(10, 5, 10)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y1kpu"]
|
||||
albedo_texture = ExtResource("1_8xru0")
|
||||
uv1_triplanar = true
|
||||
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_y1kpu"]
|
||||
top_radius = 1.0
|
||||
bottom_radius = 1.0
|
||||
height = 0.05
|
||||
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_1w8vm"]
|
||||
top_radius = 0.1
|
||||
bottom_radius = 0.1
|
||||
height = 1.0
|
||||
|
||||
[node name="Room" type="Node3D"]
|
||||
|
||||
[node name="CSGMesh3D" type="CSGMesh3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0)
|
||||
flip_faces = true
|
||||
mesh = SubResource("BoxMesh_kxljb")
|
||||
material = SubResource("StandardMaterial3D_y1kpu")
|
||||
|
||||
[node name="Table" type="Node3D" parent="."]
|
||||
|
||||
[node name="CSGMesh3D2" type="CSGMesh3D" parent="Table"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
mesh = SubResource("CylinderMesh_y1kpu")
|
||||
material = ExtResource("2_kxljb")
|
||||
|
||||
[node name="CSGMesh3D" type="CSGMesh3D" parent="Table"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000680447, 0.472962, -9.13143e-05)
|
||||
mesh = SubResource("CylinderMesh_1w8vm")
|
||||
material = ExtResource("2_kxljb")
|
||||
7
scenes/room/table.tres
Normal file
7
scenes/room/table.tres
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://vxxgydkoi8qp"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dtkppjofklkfh" path="res://addons/kenney_prototype_textures/orange/texture_01.png" id="1_m5q5g"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_m5q5g")
|
||||
uv1_triplanar = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue