Puuuuuush

This commit is contained in:
brausjonas
2023-04-07 00:03:03 +02:00
parent 98cdfc691e
commit 93147cd67e
5 changed files with 7 additions and 13 deletions
+1 -7
View File
@@ -1,19 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f0abe486-ee58-49bd-ad63-04a8b3fc78ec" name="Changes" comment=""> <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/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" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="HighlightingSettingsPerFile"> <component name="HighlightingSettingsPerFile">
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/7b2a272e51214e2f91bbc4fb4f28eff8159400/42/50d0ce90/Object.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Client.cs" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Assets/Scripts/Client.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/EventField.cs" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/EventField.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/Field.cs" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/Field.cs" root0="FORCE_HIGHLIGHTING" />
+1 -1
View File
@@ -7,7 +7,7 @@ public abstract class Field : MonoBehaviour
//Liste der nächsten Feld, die auf das diesige Feld folgen //Liste der nächsten Feld, die auf das diesige Feld folgen
[SerializeField] private Field[] target; [SerializeField] private Field[] target;
[SerializeField] private Arrow[] directionalArrows; [SerializeField] private Arrow[] directionalArrows;
public Item placedItem; public GameObject placedItem;
/* /*
* Field Definition: * Field Definition:
@@ -176,8 +176,8 @@ public class NoPlayablePlayer : Player
Trap t = currentField.placedItem.GetComponent<Trap>(); Trap t = currentField.placedItem.GetComponent<Trap>();
AddCoins(-3); AddCoins(-3);
t.target.AddCoins(3); t.target.AddCoins(3);
Destroy(t.gameObject);
currentField.placedItem = null; currentField.placedItem = null;
Destroy(t.gameObject);
} }
} }
@@ -106,7 +106,7 @@ public class PlayablePlayer : Player
jumpRequest = true; jumpRequest = true;
wurfelt = true; wurfelt = true;
wurfelZahl = Random.Range(3, 4); wurfelZahl = Random.Range(6, 7);
switch (activeItem) switch (activeItem)
{ {
@@ -180,8 +180,8 @@ public class PlayablePlayer : Player
AddCoins(-3); AddCoins(-3);
Debug.Log(t.name); Debug.Log(t.name);
t.target.AddCoins(3); t.target.AddCoins(3);
Destroy(t.gameObject);
currentField.placedItem = null; currentField.placedItem = null;
Destroy(t.gameObject);
} }
} }
Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation); Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation);
@@ -373,9 +373,9 @@ public class PlayablePlayer : Player
client.SendActiveItem((byte)index); client.SendActiveItem((byte)index);
if (items[index].type == Item.Type.Trap) if (items[index].type == Item.Type.Trap)
{ {
currentField.placedItem = items[index];
GameObject temp = Instantiate(items[index].gameObject); GameObject temp = Instantiate(items[index].gameObject);
Trap t = temp.GetComponent<Trap>(); Trap t = temp.GetComponent<Trap>();
currentField.placedItem = t.gameObject;
t.target = gameObject.GetComponent<PlayablePlayer>(); t.target = gameObject.GetComponent<PlayablePlayer>();
temp.transform.position = currentField.transform.position + (Vector3.up / 2); temp.transform.position = currentField.transform.position + (Vector3.up / 2);
activeItem = Item.Type.None; activeItem = Item.Type.None;
+1 -1
View File
@@ -108,9 +108,9 @@ public abstract class Player : MonoBehaviour
itemInfoImages[index].color = new Color(0, 0, 0, 0); itemInfoImages[index].color = new Color(0, 0, 0, 0);
if (items[index].type == Item.Type.Trap) if (items[index].type == Item.Type.Trap)
{ {
currentField.placedItem = items[index];
GameObject temp = Instantiate(items[index].gameObject); GameObject temp = Instantiate(items[index].gameObject);
Trap t = temp.GetComponent<Trap>(); Trap t = temp.GetComponent<Trap>();
currentField.placedItem = t.gameObject;
t.target = gameObject.GetComponent<NoPlayablePlayer>(); t.target = gameObject.GetComponent<NoPlayablePlayer>();
temp.transform.position = currentField.transform.position + (Vector3.up / 2); temp.transform.position = currentField.transform.position + (Vector3.up / 2);
activeItem = Item.Type.None; activeItem = Item.Type.None;