This commit is contained in:
AliIbnAbiTalib
2023-04-06 23:43:59 +02:00
parent ef09b2770b
commit 98cdfc691e
4 changed files with 8 additions and 5 deletions
+3 -1
View File
@@ -5,6 +5,7 @@
<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$/.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/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/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> </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" />
@@ -12,6 +13,7 @@
<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" />
@@ -152,7 +154,7 @@
<workItem from="1680459748883" duration="4859000" /> <workItem from="1680459748883" duration="4859000" />
<workItem from="1680539278905" duration="1085000" /> <workItem from="1680539278905" duration="1085000" />
<workItem from="1680546560659" duration="3839000" /> <workItem from="1680546560659" duration="3839000" />
<workItem from="1680813239896" duration="2480000" /> <workItem from="1680813239896" duration="4155000" />
</task> </task>
<servers /> <servers />
</component> </component>
@@ -176,7 +176,7 @@ 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); Destroy(t.gameObject);
currentField.placedItem = null; currentField.placedItem = null;
} }
} }
@@ -178,8 +178,9 @@ public class PlayablePlayer : Player
{ {
Trap t = currentField.placedItem.GetComponent<Trap>(); Trap t = currentField.placedItem.GetComponent<Trap>();
AddCoins(-3); AddCoins(-3);
Debug.Log(t.name);
t.target.AddCoins(3); t.target.AddCoins(3);
Destroy(t); Destroy(t.gameObject);
currentField.placedItem = null; currentField.placedItem = null;
} }
} }
@@ -375,7 +376,7 @@ public class PlayablePlayer : Player
currentField.placedItem = items[index]; 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>();
t.target = this; 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
@@ -111,7 +111,7 @@ public abstract class Player : MonoBehaviour
currentField.placedItem = items[index]; 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>();
t.target = this; 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;
} }