Example #1
0
    protected override void OnInitialize()
    {
        Main.instance.eventManager.TriggerEvent(GameEvents.MINION_SPAWN, new object[] { this });

        _rb = GetComponent <Rigidbody>();
        combatComponent.Configure(AttackEntity);
        Main.instance.GetCombatDirector().AddNewTarget(this);
        lifesystem.AddEventOnDeath(OnDead);
        anim.Add_Callback("DealDamage", DealDamage);
    }
Example #2
0
    protected override void OnInitialize()
    {
        Debug.Log("OnInitialize");
        headAttack.Configure(HeadAttack);
        pushAttack.Configure(PushRelease, StunAfterCharge);
        anim.Add_Callback("DealDamage", DealDamage);
        anim.Add_Callback("Death", DeathAnim);
        lifesystem.AddEventOnDeath(Die);
        currentSpeed = speedMovement;
        StartDebug();

        Main.instance.AddEntity(this);

        IAInitialize(Main.instance.GetCombatDirector());
    }
    protected override void OnInitialize()
    {
        Main.instance.eventManager.TriggerEvent(GameEvents.ENEMY_SPAWN, new object[] { this });

        //Debug.Log("OnInitialize");
        rb = GetComponent <Rigidbody>();
        combatComponent.Configure(AttackEntity);
        anim.Add_Callback("DealDamage", DealDamage);
        anim.Add_Callback("Death", DeathAnim);
        lifesystem.AddEventOnDeath(Die);
        currentSpeed = speedMovement;
        StartDebug();

        Main.instance.AddEntity(this);

        IAInitialize(Main.instance.GetCombatDirector());
    }
Example #4
0
 public void OnBegin()
 {
     enemyLifeSystem.AddEventOnDeath(OnExecute);
 }