コード例 #1
0
ファイル: StandArrow.cs プロジェクト: HellGoesOn/TBAR
        public override bool UseItem(Player player)
        {
            TBARPlayer tBAR = TBARPlayer.Get(player);

            tBAR.PlayerStand = StandLoader.Instance.GetNewRandom(tBAR);

            if (!TBARConfig.internalSimpleArrowUse)
            {
                InputBlocker.BlockInputs(player, item.useAnimation);

                player.mount.Dismount(player);

                tBAR.ArrowProgress = tBAR.ArrowProgressMax;

                tBAR.ScreenModifiers.Add(new SmoothStepScreenModifier(player.Center, player.Center - new Vector2(0, 64), 0.025f, item.useAnimation));
                tBAR.ScreenModifiers.Add(new ScreenModifier(player.Center - new Vector2(0, 64), item.useAnimation));

                tBAR.UsePosition = player.Center + new Vector2(0, player.height * 0.5f);

                player.velocity = Vector2.Zero;
            }

            Main.NewText("You've acquired a stand: " + tBAR.PlayerStand.StandName);

            return(true);
        }
コード例 #2
0
 private void FlyUpState_OnStateBegin(StandState sender)
 {
     InputBlocker.BlockInputs(Owner, 90);
     SlamDunkPosition = new Vector2(MousePosition.X, MousePosition.Y - 400);
 }