コード例 #1
0
    // Use this for initialization
    void Start()
    {
        CheckPointSaver checkPoint = GameObject.FindGameObjectWithTag("Respawn").GetComponent <CheckPointSaver>();

        transform.position = checkPoint.getCheckPointPosition();
        if (transform.position.y > 3)
        {
            GetComponent <PortalGun> ().enabled = true;
            offhand.SetActive(true);
        }
        GameObject.FindWithTag("MainCamera").transform.position = checkPoint.getCameraPosition();
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     checkPointScript = GameObject.FindWithTag("Respawn").GetComponent <CheckPointSaver> ();
 }