LOL
Itemshop Layout2 edited
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ItemShop : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87be2f31745a56643883eec0eb73919d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -6,6 +6,8 @@ using UnityEngine;
|
||||
|
||||
public abstract class Player : MonoBehaviour
|
||||
{
|
||||
private GameObject Layout2;
|
||||
|
||||
public string name = "";
|
||||
public bool activated = false;
|
||||
protected bool wurfelt = false;
|
||||
@@ -25,6 +27,7 @@ public abstract class Player : MonoBehaviour
|
||||
private void Start()
|
||||
{
|
||||
animationHandler = GetComponentInChildren<AnimationHandler>();
|
||||
Layout2 = GameObject.Find("Layout2");
|
||||
}
|
||||
|
||||
//Aktiviert den Player
|
||||
@@ -66,5 +69,6 @@ public abstract class Player : MonoBehaviour
|
||||
private void OnTriggerEnter(Collider c)
|
||||
{
|
||||
eventstop = true;
|
||||
Layout2.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ public class StartHandler : MonoBehaviour
|
||||
[SerializeField] private GameObject buttonSubmitName;
|
||||
[SerializeField] private TMP_Text playerName;
|
||||
[SerializeField] private GameObject copiedMessage;
|
||||
|
||||
[SerializeField] private TMP_Text backgroundNameText;
|
||||
|
||||
private string roomcode;
|
||||
|
||||
private void Start()
|
||||
@@ -125,18 +126,25 @@ public class StartHandler : MonoBehaviour
|
||||
public void ButtonSubmitName()
|
||||
{
|
||||
string name = nameEnter.text;
|
||||
for (int i = name.Length; i < 10; i++)
|
||||
if (name.Length>2)
|
||||
{
|
||||
name += " ";
|
||||
for (int i = name.Length; i < 10; i++)
|
||||
{
|
||||
name += " ";
|
||||
}
|
||||
|
||||
PlayerPrefs.SetString("name", name);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
playerName.text = PlayerPrefs.GetString("name");
|
||||
|
||||
layout0.SetActive(false);
|
||||
layout1.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
backgroundNameText.text = "to short...";
|
||||
}
|
||||
|
||||
PlayerPrefs.SetString("name", name);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
playerName.text = PlayerPrefs.GetString("name");
|
||||
|
||||
layout0.SetActive(false);
|
||||
layout1.SetActive(true);
|
||||
}
|
||||
|
||||
public void ButtonEditName()
|
||||
|
||||
Reference in New Issue
Block a user