Esempio 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();
    }
Esempio 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);
    }