Exemplo n.º 1
0
    public void Attack()
    {
        //PlayThenIdleAsync(AnimationComponent.AttackAnimation).Coroutine();

        var monster = GameObject.Find("Monster");

        SpawnLineEffect(AttackPrefab, transform.position, monster.transform.position);
        SpawnHitEffect(transform.position, monster.transform.position);

        CombatEntity.GetComponent <AttributeComponent>().AttackPower.SetBase(ET.RandomHelper.RandomNumber(600, 999));

        var action = CombatEntity.CreateAction <AttackAction>();

        action.Target = monster.GetComponent <Monster>().CombatEntity;
        action.ApplyAttack();
    }