Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
    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;
    }