Esempio n. 1
0
	void Start () 
	{
		controller = GetComponent<Player2D> ();
		
		gravity = -(2 * jumpHeight) / Mathf.Pow (timeToJumpApex, 2);
		jumpVelocity = Mathf.Abs (gravity) * timeToJumpApex;
		print ("Gravity:" + gravity + " Jump Velocity" + jumpVelocity);
	}
Esempio n. 2
0
 void Awake()
 {
     playerData2D = GameObject.FindWithTag("Player2D").GetComponent<PlayerData2D>();
     player2D = GameObject.FindWithTag("Player2D").GetComponent<Player2D>();
     lifes2D = 	   gameObject.GetComponent<Lifes2D>();
     scoreUpAnim =  gameObject.GetComponent<ScoreUpAnim>();
     comboText2D =  GameObject.Find("Combo2D").GetComponent<Text>();
     comboText3D =  GameObject.Find("Combo3D").GetComponent<Text>();
     ComboDraw ();
 }
Esempio n. 3
0
	// Use this for initialization
	void Start () {
        player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player2D>();
        barHP = transform.FindChild("Bar_HP").Find("Fill").GetComponent<Image>();
	}
Esempio n. 4
0
 private void Awake()
 {
     character = GetComponent<Player2D>();
 }
Esempio n. 5
0
	// Debug (For testing only)

	void Start ()
	{
		cam = Camera.main;
		playerScript = player.GetComponent<Player2D>();
		RequestScoreCheckpoints ();
	}