public void ShowLootWeapon(Unit u, LootItem loot) { if (u == Variables.Player) { string s = "得到"; switch (loot.LootSettings.LootType) { case LootType.Weapon: { WeaponType source = Content.Load <WeaponType>(loot.LootSettings.ObjectName); s = s + source.weaponName; } break; case LootType.MissileWeapon: { MissileWeaponType source = Content.Load <MissileWeaponType>(loot.LootSettings.ObjectName); s = s + source.name; } break; default: break; } Vector2 v = new Vector2((float)AODGameLibrary.Helpers.RandomHelper.Random.NextDouble() - 0.5f, (float)AODGameLibrary.Helpers.RandomHelper.Random.NextDouble() - 0.5f); if (v == Vector2.Zero) { v = Vector2.UnitX; } v = Vector2.Normalize(v) * GameConsts.LootInfSpeed; ShowInstantMessage(s, GameConsts.LootInfPosition, v, Color.White, 2); } }
public void ShowLootTipInf(Unit u, LootItem loot) { if (u == Variables.Player) { string b = ""; string c = ""; switch (loot.LootSettings.LootType) { case LootType.Weapon: { b = "main weapon"; WeaponType source = Content.Load <WeaponType>(loot.LootSettings.ObjectName); c = source.weaponName; lootTipInf = "Press E(X) to destroy current " + b + " and equip " + c; } break; case LootType.MissileWeapon: { b = "side weapon"; MissileWeaponType source = Content.Load <MissileWeaponType>(loot.LootSettings.ObjectName); c = source.name; lootTipInf = "Press E(X) to destroy current " + b + " and equip " + c; } break; case LootType.SkillItem: { b = "module"; Skill source = Content.Load <Skill>(loot.LootSettings.ObjectName); c = source.SkillName; lootTipInf = "Press E(X) to destroy current " + b + " and equip " + c; } break; case LootType.QuestItem: break; default: break; } } }