Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     contador = 0;
     sr       = this.GetComponent("SpriteRenderer") as SpriteRenderer;
     scrptVT  = Camera.main.GetComponent("ViajesTemporales") as ViajesTemporales;
     scrptPJ  = player.GetComponent("ControladorPersonaje") as ControladorPersonaje;
 }
Esempio n. 2
0
 void Start()
 {
     contador   = 0;
     posiciones = new List <float>();
     scrptPJ    = player.GetComponent("ControladorPersonaje") as ControladorPersonaje;
     sp         = player.GetComponent("SpriteRenderer") as SpriteRenderer;
     initX      = transform.position.x;
 }
 void Awake()
 {
     if (control == null)
     {
         DontDestroyOnLoad(this.gameObject);
         control = this;
     }
     else if (control == this)
     {
         Destroy(this.gameObject);
     }
 }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        generador     = GameObject.FindGameObjectWithTag("SueloContinuo").GetComponent <Generador>();
        particleStar2 = GameObject.Find("ParticleStar2").GetComponent <ParticleSystem>();
        player        = GameObject.Find("Panda").GetComponent <ControladorPersonaje>();
        music         = GameObject.Find("MainCamera").GetComponent <AudioSource>();
        GameObject go = GameObject.FindGameObjectWithTag("ParticleStar");

        particleStar = go.GetComponent <ParticleSystem>();
        rend         = GetComponent <SpriteRenderer>();
        coll         = GetComponent <CircleCollider2D>();
    }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     initRight = right;
     q         = new Quaternion();
     iniX      = this.transform.position.x;
     iniY      = this.transform.position.y;
     if (right)
     {
         q = Quaternion.Euler(0f, 180f, 0f);
         transform.rotation = q;
     }
     scrptPJ = player.GetComponent("ControladorPersonaje") as ControladorPersonaje;
     scrptVT = Camera.main.GetComponent("ViajesTemporales") as ViajesTemporales;
 }
Esempio n. 6
0
    private void Start()
    {
        Instance         = this;
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;

        MainCamera.transform.SetParent(posicionDeCamara, false);
        MainCamera.transform.localPosition = Vector3.zero;
        MainCamera.transform.localRotation = Quaternion.identity;
        controlador = GetComponent <CharacterController>();

        anguloVertical   = 0.0f;
        anguloHorizontal = transform.localEulerAngles.y;
    }
Esempio n. 7
0
 // Start is called before the first frame update
 void Start()
 {
     cPJ = GameObject.Find("PJ(Clone)").GetComponent <ControladorPersonaje>();
 }
Esempio n. 8
0
 // Use this for initialization
 void Start()
 {
     pollo = GameObject.Find("GameController").GetComponent <GameController> ();
     pj    = GameObject.Find("PJ(Clone)").GetComponent <ControladorPersonaje>();
 }
Esempio n. 9
0
 void Awake()
 {
     //generador = GameObject.FindWithTag ("GameController").GetComponent<Generador> ();
     personaje  = GameObject.FindWithTag("Player");
     cPersonaje = personaje.GetComponent <ControladorPersonaje> ();
 }
Esempio n. 10
0
 void Start()
 {
     personaje          = GetComponent <ControladorPersonaje>();
     animator           = GetComponent <Animator>();
     plataformasPisadas = 0;
 }