Transferprotocol Definitions
This commit is contained in:
@@ -111,6 +111,7 @@
|
||||
<workItem from="1674945078351" duration="7063000" />
|
||||
<workItem from="1675011774462" duration="1723000" />
|
||||
<workItem from="1675112930043" duration="1858000" />
|
||||
<workItem from="1675193746966" duration="2586000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb6f7c9a6e6cd424c853338442fa92fc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -106,8 +106,9 @@ public class Client : MonoBehaviour
|
||||
}
|
||||
|
||||
players[job.data[1]].name = Encoding.ASCII.GetString(name).Replace(" ", "");
|
||||
players[job.data[1]].index = job.data[1];
|
||||
players[job.data[1]].Init();
|
||||
|
||||
|
||||
playerNameTexts[job.data[1]].text = Encoding.ASCII.GetString(name).Replace(" ", "");
|
||||
|
||||
uiHandler.ActivateLayout1();
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class EventField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ public abstract class Field : MonoBehaviour
|
||||
[SerializeField] private Field[] target;
|
||||
[SerializeField] private Arrow[] directionalArrows;
|
||||
|
||||
/*
|
||||
* Field Definition:
|
||||
*/
|
||||
|
||||
public Field[] Target
|
||||
{
|
||||
get
|
||||
@@ -25,5 +29,5 @@ public abstract class Field : MonoBehaviour
|
||||
}
|
||||
|
||||
//Feld aktion (Münzen etc..)
|
||||
public abstract void Action();
|
||||
public abstract int Action(int playerIndex);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class GetCoinsField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class ItemField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class LooseCoinsField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class LuckField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class UnluckyField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class VSField : Field
|
||||
{
|
||||
public override void Action()
|
||||
public override int Action(int playerIndex)
|
||||
{
|
||||
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,9 @@ public class PlayablePlayer : Player
|
||||
{
|
||||
wurfelZahl--;
|
||||
|
||||
//the next field is the current field XD
|
||||
currentField = nextField;
|
||||
|
||||
//Visiere das nächste Feld an falls noch ein Zug übrig ist (Player steht gerade auf einem Feld oder läuft darüber)
|
||||
if (wurfelZahl > 0)
|
||||
{
|
||||
@@ -93,6 +96,7 @@ public class PlayablePlayer : Player
|
||||
//TODO: temp spieler finsihed erst, wenn field action ausgeführt wurde
|
||||
if (wurfelt)
|
||||
{
|
||||
currentField.Action(index);
|
||||
Invoke("Finish", 2);
|
||||
activated = false;
|
||||
}
|
||||
@@ -146,7 +150,6 @@ public class PlayablePlayer : Player
|
||||
{
|
||||
interPol = 0;
|
||||
lastPos = transform.position;
|
||||
currentField = nextField;
|
||||
if (nextField.Target.Length == 1)
|
||||
{
|
||||
nextField = nextField.Target[0];
|
||||
|
||||
@@ -12,6 +12,8 @@ public abstract class Player : MonoBehaviour
|
||||
protected Vector3 velocity = Vector3.zero;
|
||||
|
||||
protected Vector3 cameraOffset = new Vector3(-2.81f, 8.13f, 5.6f);
|
||||
public int index;
|
||||
public int coins = 0;
|
||||
|
||||
//Aktiviert den Player
|
||||
public void Activate()
|
||||
|
||||
Reference in New Issue
Block a user