Пример #1
0
	// Use this for initialization
	void Start()
	{
		if (beardman == null)
		{
			beardman = GameObject.FindGameObjectWithTag("Player").GetComponent<Rigidbody2D>();
		}
		mainCamera = Camera.main;
		movementController = beardman.GetComponent<MovementController>();
		beardAnimator = beardman.GetComponentInChildren<BeardAnimationController>();
        playerAnimator = beardman.GetComponentInChildren<Animator>();
	}
Пример #2
0
 private void Awake()
 {
     beardAnimator = gameObject.GetComponentInChildren <BeardAnimationController>();
 }