Commit f2431858 by Philipp Adolf

Move player initialization into new method

parent 6f542fd8
...@@ -61,6 +61,13 @@ public class PlayerControl : MonoBehaviour ...@@ -61,6 +61,13 @@ public class PlayerControl : MonoBehaviour
{ {
body2D = GetComponent<Rigidbody2D>(); body2D = GetComponent<Rigidbody2D>();
init(playerNumber);
}
public void init(int playerNumber)
{
this.playerNumber = playerNumber;
switch (playerNumber) switch (playerNumber)
{ {
case 1: case 1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment