Beispiel #1
0
 public void Awake()
 {
     if (GameManager.Instance == null)
     {
         GameManager.Instance    = this;
         this.firstPlayerMarker  = Field.StateOfField.CROSS;
         this.secondPlayerMarker = Field.StateOfField.CIRCLE;
         this.currentTurn        = turn.firstPlayerTurn;
     }
     else
     {
         Destroy(this);
     }
 }
 public void Awake()
 {
     //Checking if is only one instance of class
     if (GameManager.Instance == null)
     {
         GameManager.Instance = this;
         //setting up default parametrs
         this.firstPlayerMarker  = Field.StateOfField.CROSS;
         this.secondPlayerMarker = Field.StateOfField.CIRCLE;
         this.currentTurn        = turn.firstPlayerTurn;
         this.crossCurrentTurnRepresentation.enabled  = true;
         this.circleCurrentTurnRepresentation.enabled = false;
     }
     else
     {
         Destroy(this);
     }
 }