public override void UpdateAccessory(Player player, bool hideVisual) { MemePlayer p = player.GetModPlayer <MemePlayer>(); p.PepsiAccessory = true; if (hideVisual) { p.PepsiHideVanity = true; } }
public override void CheckActive() { Player player = Main.player[projectile.owner]; MemePlayer modPlayer = player.GetModPlayer <MemePlayer>(mod); if (player.dead) { modPlayer.thunderMinion = false; } if (modPlayer.thunderMinion) { projectile.timeLeft = 2; } }
public override void Update(Player player, ref int buffIndex) { MemePlayer modPlayer = player.GetModPlayer <MemePlayer>(mod); if (player.ownedProjectileCounts[mod.ProjectileType("TreeGuardian")] > 0) { modPlayer.treeMinion = true; } if (!modPlayer.treeMinion) { player.DelBuff(buffIndex); buffIndex--; } else { player.buffTime[buffIndex] = 18000; } }
private void MemeFlyout_OnIsOpenChanged(object sender, RoutedEventArgs e) { if (MemeFlyout.IsOpen) { MemePlayer.Play(); Task.Factory.StartNew(() => { Thread.Sleep(5000); MemeFlyout.Invoke(new Action(() => { if (MemeFlyout.IsOpen) { MemeFlyout.CloseButtonVisibility = Visibility.Visible; } })); }); } else { MemeFlyout.CloseButtonVisibility = Visibility.Hidden; MemePlayer.Close(); GC.Collect(); } }