示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        player    = GameObject.FindGameObjectWithTag("Player");
        platforms = this.GetComponentsInChildren <MeshRenderer>();
        Array.Sort(platforms, SortByPlatform);
        foreach (MeshRenderer r in platforms)
        {
            print(r.name);
        }

        tele.ActivateTeleporter();

        startPos = this.GetComponentInChildren <StartPoint>().transform;
    }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        foreach (GameObject p in platforms) //makes them all disapper at start so can keep on during debugging
        {
            p.GetComponent <BoxCollider>().enabled  = false;
            p.GetComponent <MeshRenderer>().enabled = false;
        }
        balls = this.GetComponentsInChildren <BallRespawner>();

        tele.ActivateTeleporter();  //just make teleporter reachable

        startPos = this.GetComponentInChildren <StartPoint>().transform;
    }
示例#3
0
    // Start is called before the first frame update
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        tele.ActivateTeleporter();

        grabbableStartPoints    = new Vector3[objectGrabbables.Length];
        grabbableStartRotations = new Quaternion[objectGrabbables.Length];
        for (int i = 0; i < objectGrabbables.Length; i++)
        {
            grabbableStartPoints[i]    = objectGrabbables[i].transform.position;
            grabbableStartRotations[i] = objectGrabbables[i].transform.rotation;
        }
        startPos = this.GetComponentInChildren <StartPoint>().transform;
    }