void Awake() { // Retrieve range feedback sprite renderer _rangeSprite = gameObject.GetComponent <SpriteRenderer>(); // Retrieve duration feedback's transform _durationTransform = transform.FindChild("Delay"); // Retrieve paticle and configure it _particle = new OrderParticle(transform.FindChild("Particle")); _particle.RecalculateTravelSpeed(_duration); _state = States.WAITING_ORIGIN; }
void Awake() { // Retrieve range feedback sprite renderer _rangeSprite = gameObject.GetComponent<SpriteRenderer>(); // Retrieve duration feedback's transform _durationTransform = transform.FindChild("Delay"); // Retrieve paticle and configure it _particle = new OrderParticle(transform.FindChild("Particle")); _particle.RecalculateTravelSpeed(_duration); _state = States.WAITING_ORIGIN; }