private OponentGameController AddPlayer(bool attacker) { var game = Instantiate(oponentPrefab); OponentGameController gg = game.GetComponent <OponentGameController>(); gg.attacker = attacker; game.transform.position = new Vector3(xPos, 0f, 0f); xPos += sceneHeight; return(gg); }
private void Start() { attackerGame = AddPlayer(true); myGame = AddPlayer(); targetGame = AddPlayer(false); }