Example #1
0
 // Use this for initialization
 void Start()
 {
     tbu         = obj_tbu.GetComponent <TouchButtonRight> ();
     tbd         = obj_tbd.GetComponent <TouchButton> ();
     cMovement   = obj_camera.GetComponent <CameraMovment> ();
     ridigbody2d = gameObject.GetComponent <Rigidbody2D> ();
 }
Example #2
0
 void Awake()
 {
     //Singleton
     if (instance == null) //if instance is not assigned
     {
         instance = this;  //then assign instance to this object
     }
     else if (instance != this)
     {
         Destroy(this.gameObject);  //then destroy this object
     }
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     rigidbody2d = gameObject.GetComponent <Rigidbody2D> ();
     cMovement   = obj_camera.GetComponent <CameraMovment> ();
     if (Application.loadedLevelName == ("Scen3") || Application.loadedLevelName == ("Scen5") ||
         Application.loadedLevelName == ("Scen7"))
     {
         timer = obj_timer.GetComponent <Timer> ();
     }
     if (Application.loadedLevelName == ("Scen7"))
     {
         pManager = obj_pManager.GetComponent <PointManager> ();
     }
 }
    void Awake()
    {
        cameraScript     = GetComponent <CameraMovment>();
        controllerScript = GetComponent <PlayerConroller>();

        if (photonView.isMine)
        {
            //MINE: local player, simply enable the local scripts
            cameraScript.enabled     = true;
            controllerScript.enabled = true;
        }
        else
        {
            cameraScript.enabled = false;

            controllerScript.enabled = false;
        }

        gameObject.name = gameObject.name + photonView.viewID;
    }
Example #5
0
 // Start is called before the first frame update
 void Start()
 {
     cam = Camera.main.GetComponent <CameraMovment>();
 }
Example #6
0
 void Start()
 {
     playermoveScript     = obj_player.GetComponent <PlayerMovement>();
     cameramovenemtScript = obj_player.GetComponent <CameraMovment> ();
     plmS = obj_player2.GetComponent <PlayerMovment2> ();
 }
Example #7
0
 // Start is called before the first frame update
 void Start()
 {
     // Referência da Câmera que guarda as posições maxiams e mínimas
     m_camera = Camera.main.GetComponent <CameraMovment>();
 }
Example #8
0
 // Start is called before the first frame update
 void Start()
 {
     S = this;
 }