public void TowerKilled(DamageProcess damageProcess) { switch (damageProcess.Target.Team) { case ETeam.Blue: ScoreBoardManager.Instance.RedTowerScore++; break; case ETeam.Red: ScoreBoardManager.Instance.BlueTowerScore++; break; } }
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; } } }
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); } }
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; } }
public void ModifyDamageMultiplier(DamageProcess process) { process.AdBResMod = 0; process.ApBResMod = 0; }
private void TowerKilled(DamageProcess damageProcess) { GameManager.instance.TowerKilled(damageProcess); }
private void NexusDestroyed(DamageProcess damageProcess) { GameManager.instance.NexusDestroyed(m_entity); RpcNexusDestroyed(); }
private void MinionKilled(DamageProcess damageProcess) { GameManager.instance.MinionKilled(damageProcess); }
public void ServerSendSlainEvent(DamageProcess damageProcess) { RpcEnqueueSlainEvent(damageProcess.Attacker.InstanceId, damageProcess.Target.InstanceId); }