Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     higariGameobj  = GameObject.FindGameObjectWithTag("Ninja");
     grimReaperAnim = gameObject.GetComponent <Animator>();
     if (higariGameobj != null)
     {
         higari = higariGameobj.GetComponent <HigariController>();
     }
     grimReaper          = gameObject.GetComponent <Rigidbody2D>();
     grimReaper.velocity = new Vector2(0, -speed);
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     vegetaMileStones     = 5000;
     itachiMileStones     = 3000;
     grimReaperMileStones = 7000;
     Time.timeScale       = 1;
     score = 0;
     MakeInstance();
     ninja = GameObject.FindGameObjectWithTag("Ninja").GetComponent <HigariController>();
     maxY  = Camera.main.ViewportToWorldPoint(new Vector2(1, 1)).y;
     minX  = Camera.main.ViewportToWorldPoint(new Vector2(0, 0)).x;
     maxX  = Camera.main.ViewportToWorldPoint(new Vector2(1, 1)).x;
     GameObject.Instantiate(groundLeft, new Vector2(minX + 0.2f, 0), Quaternion.identity);
     GameObject.Instantiate(groundRight, new Vector2(maxX - 0.2f, 0), Quaternion.identity);
     InvokeRepeating("Spawm", 0.1f, 1.046f); //1.05
     InvokeRepeating("CreateObtacle", 1, 1f);
     endPanel.gameObject.SetActive(false);
     pausePanel.gameObject.SetActive(false);
     IsGameStartForTheFirstTime();
 }
 void Start()
 {
     Ninja = GameObject.FindGameObjectWithTag("Ninja").GetComponent <HigariController>();
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     higari        = GameObject.FindGameObjectWithTag("Ninja").GetComponent <HigariController>();
     targetPositon = higari.transform.position;
 }