Example #1
0
    protected virtual void Awake()
    {
        heroInterac = GetComponentInChildren <HeroInteractor> ();
        rigidBody2D = GetComponent <Rigidbody2D> ();

        //get the animator
        animator = GetComponentInChildren <Animator> ();

        gravityOriginal = rigidBody2D.gravityScale;

        CalculateJumpForce();
        CalculateWalkingMotorAngularSpeed();
    }
Example #2
0
	protected virtual void Awake ()
	{
		heroInterac = GetComponentInChildren<HeroInteractor> ();
		rigidBody2D = GetComponent<Rigidbody2D> ();
		
		//get the animator
		animator = GetComponentInChildren<Animator> ();
		
		gravityOriginal = rigidBody2D.gravityScale;
		
		CalculateJumpForce ();
		CalculateWalkingMotorAngularSpeed ();
	}