Ejemplo n.º 1
0
    void Awake()
    {
        unit = gameObject.GetComponent <UnitCreep>();
        if (unit == null)
        {
            return;
        }

        if (animationAttack != null)
        {
            unit.SetAttackAnimation(animationAttack);
        }
        if (animationIdle != null)
        {
            unit.SetIdleAnimation(animationIdle);
        }

        if (shootObject != null)
        {
            ObjectPoolManager.New(shootObject, 2);
        }

        UpdateShootPointNBarrelObj();
    }
Ejemplo n.º 2
0
    void Awake()
    {
        unit=gameObject.GetComponent<UnitCreep>();
        if(unit==null) return;

        if(animationAttack!=null) unit.SetAttackAnimation(animationAttack);
        if(animationIdle!=null) unit.SetIdleAnimation(animationIdle);

        if(shootObject!=null) ObjectPoolManager.New(shootObject, 2);
    }