コード例 #1
0
    // Use this for initialization
    void Start()
    {
        LM              = GameObject.Find("LevelManager").GetComponent <LevelManager>();
        mainCam         = Camera.main;
        follower        = mainCam.GetComponent <PlatformerCameraFollow>();
        playerObject    = GameObject.FindGameObjectWithTag("Player");
        boxC            = gameObject.GetComponent <BoxCollider>();
        cameraIsStalled = false;
        colliderOnLeft  = true;

        //set collider to the x position defined by the stall distance.
        boxC.transform.Translate(-cameraStallDistance, 0f, 0f);
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     mainCam  = Camera.main;
     follower = mainCam.GetComponent <PlatformerCameraFollow>();
 }