Exemplo n.º 1
0
    public GameObject CreateRocket()
    {
        Vector2    pos   = mainCircle.GetRandomPoint();
        GameObject probe = Instantiate(ProbePrefab, pos, Quaternion.identity);

        probe.transform.rotation = QuaternionUtil.GetOppositeDirection(probe, MainObject);
        probe.transform.SetParent(MainObject.transform);
        probe.GetComponent <RocketBehaviour>().Init(endCircle);
        return(probe);
    }