summaryrefslogtreecommitdiff
path: root/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes')
-rw-r--r--Scenes/Dungeon.gd1
-rw-r--r--Scenes/Mesh.gd2
-rw-r--r--Scenes/Player.gd2
-rw-r--r--Scenes/Player.tscn63
4 files changed, 57 insertions, 11 deletions
diff --git a/Scenes/Dungeon.gd b/Scenes/Dungeon.gd
index 00cee84..3c9da26 100644
--- a/Scenes/Dungeon.gd
+++ b/Scenes/Dungeon.gd
@@ -106,6 +106,7 @@ func move_player(dir : Vector2):
player.add_action("cor_move", [tile_to_pos(new_tile)])
player.roll(dir)
+ print(player.get_upper_face())
func tile_to_pos(tile : Vector2):
return Vector3(tile.x, 0, -tile.y)
diff --git a/Scenes/Mesh.gd b/Scenes/Mesh.gd
index d58d74c..e450780 100644
--- a/Scenes/Mesh.gd
+++ b/Scenes/Mesh.gd
@@ -1,4 +1,4 @@
-extends MeshInstance
+extends Spatial
var target_basis : Basis
diff --git a/Scenes/Player.gd b/Scenes/Player.gd
index 1666ba2..057a198 100644
--- a/Scenes/Player.gd
+++ b/Scenes/Player.gd
@@ -30,7 +30,7 @@ const chart_spin = [
[0, 2, 3, 0],
]
-var symbols = ['1', '2', '3', '4', '5', '6']
+var symbols = ['1', '3', '5', '2', '4', '6']
var side = 0
var spin = 0
diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn
index 1bc335f..17684fe 100644
--- a/Scenes/Player.tscn
+++ b/Scenes/Player.tscn
@@ -1,21 +1,66 @@
-[gd_scene load_steps=5 format=2]
+[gd_scene load_steps=15 format=2]
[ext_resource path="res://Scenes/Player.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Mesh.gd" type="Script" id=2]
+[ext_resource path="res://Assets/5_dots.png" type="Texture" id=3]
+[ext_resource path="res://Assets/DiceFaceMaterial.tres" type="Material" id=4]
+[ext_resource path="res://Assets/3_dots.png" type="Texture" id=5]
+[ext_resource path="res://Assets/4_dots.png" type="Texture" id=6]
+[ext_resource path="res://Assets/2_dots.png" type="Texture" id=7]
+[ext_resource path="res://Assets/6_dots.png" type="Texture" id=8]
-[sub_resource type="CubeMesh" id=2]
-size = Vector3( 1, 1, 1 )
+[sub_resource type="QuadMesh" id=5]
-[sub_resource type="SpatialMaterial" id=4]
-albedo_color = Color( 0.403922, 0.729412, 0.427451, 1 )
+[sub_resource type="SpatialMaterial" id=6]
+albedo_texture = ExtResource( 8 )
+
+[sub_resource type="SpatialMaterial" id=7]
+albedo_texture = ExtResource( 7 )
+
+[sub_resource type="SpatialMaterial" id=8]
+albedo_texture = ExtResource( 3 )
+
+[sub_resource type="SpatialMaterial" id=9]
+albedo_texture = ExtResource( 5 )
+
+[sub_resource type="SpatialMaterial" id=10]
+albedo_texture = ExtResource( 6 )
[node name="Player" type="Spatial"]
script = ExtResource( 1 )
actionable = true
-[node name="Mesh" type="MeshInstance" parent="."]
+[node name="Mesh" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0 )
-mesh = SubResource( 2 )
-skeleton = NodePath("../..")
-material/0 = SubResource( 4 )
script = ExtResource( 2 )
+
+[node name="FaceUp" type="MeshInstance" parent="Mesh"]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.5, 0 )
+material_override = ExtResource( 4 )
+mesh = SubResource( 5 )
+material/0 = null
+
+[node name="FaceDown" type="MeshInstance" parent="Mesh"]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -0.5, 0 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 6 )
+
+[node name="FaceRight" type="MeshInstance" parent="Mesh"]
+transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.5, 0, 0 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 7 )
+
+[node name="FaceLeft" type="MeshInstance" parent="Mesh"]
+transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.5, 0, 0 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 8 )
+
+[node name="FaceForward" type="MeshInstance" parent="Mesh"]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.5 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 9 )
+
+[node name="FaceBackward" type="MeshInstance" parent="Mesh"]
+transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -0.5 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 10 )