- Added support for animated projectiles - Refactoring - Removed useless fields - Fixed swords not dealing damages - Added Hour Hand (from Evie's PR)
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Terraria.UI;
|
|
using Terraria;
|
|
using Microsoft.Xna.Framework;
|
|
|
|
namespace Decimation.Content.UI
|
|
{
|
|
public class AmuletSlotState : UIState
|
|
{
|
|
public AmuletSlot slot;
|
|
|
|
public AmuletSlotState()
|
|
{
|
|
slot = new AmuletSlot(scale: Main.inventoryScale);
|
|
|
|
slot.SetPadding(0);
|
|
|
|
Append(slot);
|
|
}
|
|
|
|
public void UpdateAmulet(DecimationPlayer player)
|
|
{
|
|
slot.UpdateAmulet(player);
|
|
}
|
|
|
|
public override void Update(GameTime gameTime)
|
|
{
|
|
base.Update(gameTime);
|
|
|
|
// TODO to improve
|
|
if (Main.screenHeight > 660 && (Main.mapStyle != 1 || Main.screenHeight > 900))
|
|
{
|
|
slot.Left.Set(Main.screenWidth - 91f, 0f);
|
|
slot.Top.Set(Main.screenHeight - 100f, 0f);
|
|
}
|
|
else
|
|
{
|
|
slot.Left.Set(Main.screenWidth - 234f, 0f);
|
|
slot.Top.Set(Main.screenHeight - 152f, 0f);
|
|
}
|
|
}
|
|
}
|
|
}
|