This commit is contained in:
brausjonas
2023-04-15 00:19:07 +02:00
parent 7e9d715574
commit 95e4d9d0fd
11 changed files with 62 additions and 9 deletions
+2 -2
View File
@@ -878,7 +878,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6425561450210311795}
m_LocalRotation: {x: -0, y: 0.95767283, z: -0, w: 0.28785893}
m_LocalPosition: {x: 0, y: 0, z: 1.06}
m_LocalPosition: {x: 0, y: 0, z: -0.07}
m_LocalScale: {x: 3.412188, y: 3.412188, z: 3.412188}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -887,7 +887,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 150.256, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.26, y: 8.59}
m_AnchoredPosition: {x: -0.26, y: 9}
m_SizeDelta: {x: 20, y: 5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!23 &5214616606244138098
@@ -34056,6 +34056,7 @@ GameObject:
- component: {fileID: 1328561026}
- component: {fileID: 1328561025}
- component: {fileID: 1328561028}
- component: {fileID: 1328561029}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
@@ -34189,6 +34190,18 @@ MonoBehaviour:
m_BeforeTransparentBundles: []
m_BeforeStackBundles: []
m_AfterStackBundles: []
--- !u!114 &1328561029
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1328561024}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1b0524290b57a8b45b31ee4a5c0dc391, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1354897304
PrefabInstance:
m_ObjectHideFlags: 0
+3 -1
View File
@@ -173,7 +173,8 @@ public class Client : MonoBehaviour
script.dice = dice;
script.camera = cam;
script.imageCurrentItem = imageCurrentItem;
script.textName = playerNameTexts[job.data[5]];
//ITEM INFO IMAGES
Image[] temp = new Image[3];
@@ -206,6 +207,7 @@ public class Client : MonoBehaviour
script.dice = dice;
script.camera = cam;
script.imageCurrentItem = imageCurrentItem;
script.textName = playerNameTexts[job.data[5]];
//ITEM INFO IMAGES
Image[] temp = new Image[3];
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameCamera : MonoBehaviour
{
public static GameObject gObject;
private void Start()
{
gObject = gameObject;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1b0524290b57a8b45b31ee4a5c0dc391
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+6
View File
@@ -5,7 +5,13 @@ using UnityEngine;
public class NamesText : MonoBehaviour
{
public float orgY;
private GameObject camera;
private void Start()
{
camera = GameCamera.gObject;
}
// Update is called once per frame
void Update()
{
@@ -24,6 +24,8 @@ public class NoPlayablePlayer : Player
private Vector3 useLess = new Vector3();
private bool checkDoubleDice = false;
public TMP_Text textName;
//Animation:
private Vector3 lastPosAnim = Vector3.zero;
@@ -97,6 +99,7 @@ public class NoPlayablePlayer : Player
public void Wurfeln(int wurfelZahl)
{
textName.gameObject.SetActive(true);
diceScript.SetMaterial(0);
jumpRequest = true;
@@ -33,6 +33,8 @@ public class PlayablePlayer : Player
public Client client;
private static PlayablePlayer instance;
public TMP_Text textName;
//Animation:
private Vector3 lastPosAnim = Vector3.zero;
@@ -51,8 +53,6 @@ public class PlayablePlayer : Player
diceScript = dice.GetComponent<Dice>();
instance = this;
AddItem(client.items[2]);
}
public static PlayablePlayer GetCurrentInstance()
@@ -99,6 +99,7 @@ public class PlayablePlayer : Player
{
if (!Physics.Raycast(new Vector3(Input.mousePosition.x, Input.mousePosition.y, -200), Vector3.forward))
{
textName.gameObject.SetActive(true);
DiceRollRoutine();
}
}
@@ -114,7 +115,7 @@ public class PlayablePlayer : Player
jumpRequest = true;
wurfelt = true;
wurfelZahl = Random.Range(1, 7);
wurfelZahl = Random.Range(4, 5);
switch (activeItem)
{