This commit is contained in:
AliIbnAbiTalib
2023-04-03 21:17:18 +02:00
parent 27eb835c32
commit 658d73df56
7 changed files with 346 additions and 447 deletions
+7 -5
View File
@@ -3,10 +3,12 @@
<component name="ChangeListManager">
<list default="true" id="f0abe486-ee58-49bd-ad63-04a8b3fc78ec" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.FlufflParty/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FlufflParty/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Prefabs/Trap.prefab" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Prefabs/Trap.prefab.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Items/Item.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Items/Item.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Fields/Field.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Fields/Field.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Players/NoPlayablePlayer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Players/NoPlayablePlayer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Players/Player.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Players/Player.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UserSettings/Layouts/default-2021.dwlt" beforeDir="false" afterPath="$PROJECT_DIR$/UserSettings/Layouts/default-2021.dwlt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -152,7 +154,7 @@
<workItem from="1680352698218" duration="1060000" />
<workItem from="1680459748883" duration="4859000" />
<workItem from="1680539278905" duration="1085000" />
<workItem from="1680546560659" duration="1036000" />
<workItem from="1680546560659" duration="2828000" />
</task>
<servers />
</component>
@@ -7,6 +7,7 @@ public abstract class Field : MonoBehaviour
//Liste der nächsten Feld, die auf das diesige Feld folgen
[SerializeField] private Field[] target;
[SerializeField] private Arrow[] directionalArrows;
public Item placedItem;
/*
* Field Definition:
@@ -7,7 +7,6 @@ using UnityEngine.UI;
public class NoPlayablePlayer : Player
{
public Field nextField;
private Field currentField;
public GameObject dice;
private Dice diceScript;
private Vector3 moveTo = Vector3.zero;
@@ -158,6 +157,9 @@ public class NoPlayablePlayer : Player
wurfelZahl--;
textLeftMoves.text = 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)
{
@@ -9,7 +9,6 @@ using UnityEngine.UI;
public class PlayablePlayer : Player
{
public Field nextField;
private Field currentField;
public GameObject dice;
private Dice diceScript;
private Vector3 moveTo = Vector3.zero;
@@ -361,5 +360,12 @@ public class PlayablePlayer : Player
items[index] = null;
itemInfoImages[index].color = new Color(0, 0, 0, 0);
client.SendActiveItem((byte)index);
if (items[index].type == Item.Type.Trap)
{
currentField.placedItem = items[index];
GameObject temp = Instantiate(items[index].gameObject);
temp.transform.position = currentField.transform.position + (Vector3.up / 2);
activeItem = Item.Type.None;
}
}
}
@@ -13,6 +13,7 @@ public abstract class Player : MonoBehaviour
public GameObject camera;
protected Vector3 velocity = Vector3.zero;
protected Field currentField;
protected Vector3 cameraOffset = new Vector3(-2.81f, 8.13f, 5.6f);
public int index;
@@ -106,6 +107,13 @@ public abstract class Player : MonoBehaviour
imageCurrentItem.color = new Color(1, 1, 1, 1);
itemInfoImages[index].color = new Color(0, 0, 0, 0);
items[index] = null;
if (items[index].type == Item.Type.Trap)
{
currentField.placedItem = items[index];
GameObject temp = Instantiate(items[index].gameObject);
temp.transform.position = currentField.transform.position + (Vector3.up / 2);
activeItem = Item.Type.None;
}
}
@@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.16f1
m_EditorVersionWithRevision: 2021.3.16f1 (4016570cf34f)
m_EditorVersion: 2021.3.17f1
m_EditorVersionWithRevision: 2021.3.17f1 (3e8111cac19d)
File diff suppressed because it is too large Load Diff