-
Notifications
You must be signed in to change notification settings - Fork 0
/
AerothytePlayer.cs
52 lines (51 loc) · 1.77 KB
/
AerothytePlayer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using Terraria;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria.ModLoader;
using Terraria.ID;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Aerothyte.Projectiles.Infuser;
using Aerothyte.Items;
namespace Aerothyte
{
public class AerothytePlayer : ModPlayer
{
//public static bool? holdingAndineGreatsword = false;
public bool? InfuserEquip = null;
private bool InfuserActive = false;
public static bool DebugPlayer = true;
public int counter;
private int i = 0;
public override void SetupStartInventory(IList<Item> items, bool mediumcoreDeath) {
if(!mediumcoreDeath) {
Item note = new Item();
note.SetDefaults(ModContent.ItemType<NoteToPlayer>());
note.stack = 1;
items.Add(note);
}
}
public override void ResetEffects()
{
InfuserEquip = false;
InfuserActive = false;
}
public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff)
{
// infuser - see projectiles/infuser and items/accessories/infuser
if (InfuserEquip == true && !InfuserActive && player.ownedProjectileCounts[ModContent.ProjectileType<GunMount>()] < 1) {
Projectile.NewProjectile(player.position,
Vector2.Zero,
ModContent.ProjectileType<GunMount>(),
0,
0,
player.whoAmI);
InfuserActive = true;
}
if (i == 300) { i = 0; Main.NewText(InfuserEquip + ", " + InfuserActive); }
}
}
}