Smooth Camera and Room Exist check
This commit is contained in:
@@ -29,6 +29,7 @@ public class NoPlayablePlayer : Player
|
||||
|
||||
public void Wurfeln(int wurfelZahl)
|
||||
{
|
||||
wurfelt = true;
|
||||
this.wurfelZahl = wurfelZahl;
|
||||
//nächstes Feld anvisieren
|
||||
TargetNextField();
|
||||
@@ -52,18 +53,21 @@ public class NoPlayablePlayer : Player
|
||||
wait = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
|
||||
if (activated)
|
||||
{
|
||||
camera.transform.position = Vector3.SmoothDamp(camera.transform.position, transform.position + cameraOffset, ref velocity, 0.2f);
|
||||
|
||||
if (!wait)
|
||||
{
|
||||
//Laufe zum nöchsten Feld, falls noch Züge übrig sind
|
||||
if (interPol < 1 && wurfelZahl > 0)
|
||||
{
|
||||
//delay
|
||||
if (Time.time - timeSinceWurfeln > 1)
|
||||
if (Time.time - timeSinceWurfeln > 2)
|
||||
{
|
||||
InterPolerate();
|
||||
}
|
||||
@@ -82,10 +86,13 @@ public class NoPlayablePlayer : Player
|
||||
//Der Spieler steht gerade
|
||||
else
|
||||
{
|
||||
//start the dice
|
||||
dice.transform.position = Vector3.SmoothDamp(dice.transform.position,
|
||||
transform.position + Vector3.up * 2, ref useLess, 0.2f);
|
||||
diceScript.StartRandom();
|
||||
if (!wurfelt)
|
||||
{
|
||||
//start the dice
|
||||
dice.transform.position = Vector3.SmoothDamp(dice.transform.position,
|
||||
transform.position + Vector3.up * 2, ref useLess, 0.2f);
|
||||
diceScript.StartRandom();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user