// Token: 0x060009F1 RID: 2545 RVA: 0x0002B5A8 File Offset: 0x000297A8 public void SpawnDamageNumber(float amount, Vector3 position, bool crit, TeamIndex teamIndex, DamageColorIndex damageColorIndex) { Color a = DamageColor.FindColor(damageColorIndex); Color b = Color.white; if (teamIndex != TeamIndex.None) { if (teamIndex == TeamIndex.Monster) { b = new Color(0.5568628f, 0.29411766f, 0.6039216f); } } else { b = Color.gray; } this.ps.Emit(new ParticleSystem.EmitParams { position = position, startColor = a * b, applyShapeToPosition = true }, 1); this.ps.GetCustomParticleData(this.customData, ParticleSystemCustomData.Custom1); this.customData[this.customData.Count - 1] = new Vector4(1f, 0f, amount, crit ? 1f : 0f); this.ps.SetCustomParticleData(this.customData, ParticleSystemCustomData.Custom1); }
// Token: 0x060009E5 RID: 2533 RVA: 0x0002B160 File Offset: 0x00029360 public void SetValues(GameObject victim, GameObject attacker, float damage, bool crit, DamageColorIndex damageColorIndex) { this.victimTeam = TeamIndex.Neutral; this.attackerTeam = TeamIndex.Neutral; this.scale = 1f; this.victim = victim; this.attacker = attacker; this.crit = crit; this.baseColor = DamageColor.FindColor(damageColorIndex); string text = Mathf.CeilToInt(Mathf.Abs(damage)).ToString(); this.heal = (damage < 0f); if (this.heal) { damage = -damage; base.transform.parent = victim.transform; text = "+" + text; this.baseColor = DamageColor.FindColor(DamageColorIndex.Heal); this.baseOutlineColor = this.baseColor * Color.gray; } if (victim) { TeamComponent component = victim.GetComponent <TeamComponent>(); if (component) { this.victimTeam = component.teamIndex; } } if (attacker) { TeamComponent component2 = attacker.GetComponent <TeamComponent>(); if (component2) { this.attackerTeam = component2.teamIndex; } } if (crit) { text += "!"; this.baseOutlineColor = Color.red; } this.textMeshComponent.text = text; this.UpdateMagnitude(); }