public static string FormatMob(PlacedMob mob) { string optionalFields = ""; string dead; if (mob.HasBeenKilled()) { dead = "true"; } else { optionalFields = string.Format(OPTIONAL_MOB_FIELDS_TEMPLATE, mob.GetGameObject().transform.position.x, AntiCorruption.FixHandedness(mob.GetGameObject().transform.position.z), Mathf.RoundToInt(mob.GetGameObject().transform.rotation.eulerAngles.y), GetDamageable(mob.GetGameObject()).GetMaxHealth(), GetDamageable(mob.GetGameObject()).GetHealth()); dead = "false"; } return(string.Format(MOB_TEMPLATE, mob.GetName(), optionalFields, mob.GetId(), dead)); }
public KillMobEvent(PlacedMob mob) { this.mob = mob; }