コード例 #1
0
    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);
    }
コード例 #2
0
 private void Start()
 {
     attackerGame = AddPlayer(true);
     myGame       = AddPlayer();
     targetGame   = AddPlayer(false);
 }