public void SetTimeToGrowParabola(float time) { dotsController = parabolic.GetComponent <DotsController>(); if (dotsController != null) { dotsController.SetTimeToGrowParabola(time); } }
public float GetTimeToGrowParabola() { dotsController = parabolic.GetComponent <DotsController>(); if (dotsController != null) { return(dotsController.GetTimeToGrowParabola()); } return(0); }
private void Start() { // initialize animator ids _animatorHorizontalId = Animator.StringToHash("Horizontal"); _animatorVerticalId = Animator.StringToHash("Vertical"); _animatorMovingId = Animator.StringToHash("Moving"); _animatorKilledId = Animator.StringToHash("Killed"); // don't have the movePoint as a child of the player itself movePoint.parent = null; _turnStartPosition = transform.position; _gameController = GameObject.Find("GameController").GetComponent <GameController>(); _dotsController = GameObject.Find("Dots").GetComponent <DotsController>(); _enemies = new Dictionary <GameObject, Enemy.Enemy> { { aggressiveEnemy, aggressiveEnemy.GetComponent <Enemy.Enemy>() }, { pincerEnemy, pincerEnemy.GetComponent <Enemy.Enemy>() }, { shyEnemy, shyEnemy.GetComponent <Enemy.Enemy>() }, { whimsicalEnemy, whimsicalEnemy.GetComponent <Enemy.Enemy>() } }; }