コード例 #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;
 }
コード例 #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;
 }
コード例 #3
0
 void Awake()
 {
     if (control == null)
     {
         DontDestroyOnLoad(this.gameObject);
         control = this;
     }
     else if (control == this)
     {
         Destroy(this.gameObject);
     }
 }
コード例 #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>();
    }
コード例 #5
0
ファイル: MovimientoMalo.cs プロジェクト: dhrthrh/GJFG
 // 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;
 }
コード例 #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;
    }
コード例 #7
0
 // Start is called before the first frame update
 void Start()
 {
     cPJ = GameObject.Find("PJ(Clone)").GetComponent <ControladorPersonaje>();
 }
コード例 #8
0
 // Use this for initialization
 void Start()
 {
     pollo = GameObject.Find("GameController").GetComponent <GameController> ();
     pj    = GameObject.Find("PJ(Clone)").GetComponent <ControladorPersonaje>();
 }
コード例 #9
0
 void Awake()
 {
     //generador = GameObject.FindWithTag ("GameController").GetComponent<Generador> ();
     personaje  = GameObject.FindWithTag("Player");
     cPersonaje = personaje.GetComponent <ControladorPersonaje> ();
 }
コード例 #10
0
 void Start()
 {
     personaje          = GetComponent <ControladorPersonaje>();
     animator           = GetComponent <Animator>();
     plataformasPisadas = 0;
 }