NameSync
This commit is contained in:
@@ -21,7 +21,7 @@ public class NoPlayablePlayer : Player
|
||||
|
||||
private Vector3 useLess = new Vector3();
|
||||
|
||||
public void Init()
|
||||
public override void Init()
|
||||
{
|
||||
activated = false;
|
||||
diceScript = dice.GetComponent<Dice>();
|
||||
@@ -57,7 +57,7 @@ public class NoPlayablePlayer : Player
|
||||
private void FixedUpdate()
|
||||
{
|
||||
|
||||
if (activated)
|
||||
if (activated && !name.Equals(""))
|
||||
{
|
||||
camera.transform.position = Vector3.SmoothDamp(camera.transform.position, transform.position + cameraOffset, ref velocity, 0.2f);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PlayablePlayer : Player
|
||||
|
||||
public Client client;
|
||||
|
||||
public void Init()
|
||||
public override void Init()
|
||||
{
|
||||
activated = false;
|
||||
QualitySettings.vSyncCount = 0;
|
||||
@@ -34,7 +34,7 @@ public class PlayablePlayer : Player
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (activated)
|
||||
if (activated && !name.Equals(""))
|
||||
{
|
||||
//Generiere Würfelzahl von 1-6 wenn gerade gewürfelt werden darf
|
||||
if ((Input.GetMouseButtonDown(0)) && wurfelZahl == 0 && !wurfelt)
|
||||
@@ -58,7 +58,7 @@ public class PlayablePlayer : Player
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (activated)
|
||||
if (activated && !name.Equals(""))
|
||||
{
|
||||
camera.transform.position = Vector3.SmoothDamp(camera.transform.position, transform.position + cameraOffset, ref velocity, 0.2f);
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Player : MonoBehaviour
|
||||
public abstract class Player : MonoBehaviour
|
||||
{
|
||||
public string name = "";
|
||||
public bool activated = false;
|
||||
protected bool wurfelt = false;
|
||||
|
||||
@@ -24,4 +25,6 @@ public class Player : MonoBehaviour
|
||||
{
|
||||
activated = false;
|
||||
}
|
||||
|
||||
public abstract void Init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user