Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     player             = GameObject.Find("Player");
     theScript          = player.GetComponent <sphereMovement>();
     originalPos        = transform.position;
     myPlayerTrigger    = transform.Find("playerTrigger").gameObject;
     myControlerManager = myPlayerTrigger.GetComponent <ControlerManager>();
     thisRigidBody      = transform.GetComponent <Rigidbody>();
     sfx = transform.GetComponent <AudioSource>();
 }
Ejemplo n.º 2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);;
     }
 }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        player             = GameObject.Find("Player");
        theScript          = player.GetComponent <sphereMovement>();
        originalPos        = transform.position;
        myPlayerTrigger    = transform.Find("playerTrigger").gameObject;
        myControlerManager = myPlayerTrigger.GetComponent <ControlerManager>();
        thisRigidBody      = transform.GetComponent <Rigidbody>();

        cameraP   = GameObject.Find("Camera");
        camScript = cameraP.GetComponent <CameraControl>();

        orgPos = transform.position;
        orgRot = transform.rotation;

        newPos   = orgPos;
        newPos.z = newPos.z + newPosZOff;
    }
Ejemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        //orgRot = transform.rotation;

        player             = GameObject.Find("Player");
        theScript          = player.GetComponent <sphereMovement>();
        originalPos        = transform.position;
        myPlayerTrigger    = transform.Find("playerTrigger").gameObject;
        myControlerManager = myPlayerTrigger.GetComponent <ControlerManager>();
        thisRigidBody      = transform.GetComponent <Rigidbody>();

        cameraP = GameObject.Find("Camera");
        lvl     = cameraP.GetComponent <LevelManager>();

        //orgPos = transform.position;


        hitPos   = transform.position;
        hitPos.y = hitPos.y + hitPosYOff;
        hitPos.x = hitPos.x + hitPosXOff;
    }