예제 #1
0
    public void TowerKilled(DamageProcess damageProcess)
    {
        switch (damageProcess.Target.Team)
        {
        case ETeam.Blue:
            ScoreBoardManager.Instance.RedTowerScore++;
            break;

        case ETeam.Red:
            ScoreBoardManager.Instance.BlueTowerScore++;
            break;
        }
    }
예제 #2
0
    public void MinionKilled(DamageProcess damageProcess)
    {
        if (damageProcess.Attacker is CharacterEntity)
        {
            switch (damageProcess.Target.Team)
            {
            case ETeam.Blue:
                ScoreBoardManager.Instance.RedMinionScore++;
                break;

            case ETeam.Red:
                ScoreBoardManager.Instance.BlueMinionScore++;
                break;
            }
        }
    }
예제 #3
0
    public virtual void DealDamage(float damage, DamageProcess damageProcess)
    {
        if (Dead)
        {
            return;
        }
        m_health = Mathf.Clamp(m_health - damage, 0, m_healthMax);

        if (m_health == 0)
        {
            Die(damageProcess);
            if (this is CharacterEntity)
            {
                GameEvents.Instance.ServerSendSlainEvent(damageProcess);
            }
            if (damageProcess.Attacker is CharacterEntity)
            {
                CharacterEntity attacker = damageProcess.Attacker as CharacterEntity;
                attacker.ServerGiveExperience((int)damageProcess.Target.ExpToGive);
                attacker.EntityInventory.Currency.AddCurrency(damageProcess.Target.GoldToGive);
                if (m_entityLabel != null)
                {
                    m_entityLabel.ShowFloatingText(FloatingText.FloatingTextType.GoldFloatingText, Mathf.Ceil(damageProcess.Target.GoldToGive).ToString());
                }
            }
        }
        else
        {
            if (m_entityLabel != null)
            {
                m_entityLabel.ShowFloatingText(FloatingText.FloatingTextType.DamageFloatingText, Mathf.Ceil(damage).ToString());
            }
        }

        EntityDataChanged();
        if (OnDamageDealed != null)
        {
            OnDamageDealed(damage);
        }
    }
예제 #4
0
    public virtual void Die(DamageProcess damageProcess)
    {
        if (OnDeathCallBack != null)
        {
            OnDeathCallBack(damageProcess);
        }
        m_entityAbilities.RemoveAllSideEffects();
        EntityBehaviour.StopAllBehaviours();
        StopAgent(false);
        m_dead = true;
        EntityAnimator.ChangeState(EEntityState.Dead);
        if (!string.IsNullOrEmpty(DeathParticlePrefab))
        {
            RpcSpawnDeathParticle();
            m_deathParticle = SpawnManager.instance.InstantiatePool(DeathParticlePrefab, Vector3.zero, Quaternion.identity);
            EntityTransform canvasTrasnform = GetTransformPosition(DeathParticlePosition);
            m_deathParticle.transform.SetParent(canvasTrasnform.transform);
            m_deathParticle.transform.localPosition = Vector3.zero;
        }
        switch (RespawnType)
        {
        case EEntityRespawnType.NoRespawn:
            break;

        case EEntityRespawnType.NoRespawnAndDestroy:
            StartCoroutine(NoRespawnAndDestroyCoroutine());
            break;

        case EEntityRespawnType.RespawnAndReset:
            StartCoroutine(RespawnAndResetCoroutine());
            break;

        default:
            break;
        }
    }
예제 #5
0
 public void ModifyDamageMultiplier(DamageProcess process)
 {
     process.AdBResMod = 0;
     process.ApBResMod = 0;
 }
예제 #6
0
 private void TowerKilled(DamageProcess damageProcess)
 {
     GameManager.instance.TowerKilled(damageProcess);
 }
예제 #7
0
 private void NexusDestroyed(DamageProcess damageProcess)
 {
     GameManager.instance.NexusDestroyed(m_entity);
     RpcNexusDestroyed();
 }
예제 #8
0
 private void MinionKilled(DamageProcess damageProcess)
 {
     GameManager.instance.MinionKilled(damageProcess);
 }
예제 #9
0
 public void ServerSendSlainEvent(DamageProcess damageProcess)
 {
     RpcEnqueueSlainEvent(damageProcess.Attacker.InstanceId, damageProcess.Target.InstanceId);
 }