protected override void Pressed(THSharpAction action)
        {
            base.Pressed(action);

            if (action == THSharpAction.Increase)
            {
                level = Math.Min(level + 1, 3);
            }
            if (action == THSharpAction.Decrease)
            {
                level = Math.Max(level - 1, 0);
            }

            switch (level)
            {
            case 0:
                setPitch = 1;
                break;

            case 1:
                setPitch = 0.9d;
                break;

            case 2:
                setPitch = 1.2d;
                break;

            case 3:
                setPitch = 0.8d;
                break;
            }
        }
Exemple #2
0
        protected virtual void Released(THSharpAction action)
        {
            switch (action)
            {
            //Keyboard Stuff
            case THSharpAction.Up:
                Actions[THSharpAction.Up] = false;
                break;

            case THSharpAction.Down:
                Actions[THSharpAction.Down] = false;
                break;

            case THSharpAction.Left:
                Actions[THSharpAction.Left] = false;
                break;

            case THSharpAction.Right:
                Actions[THSharpAction.Right] = false;
                break;

            case THSharpAction.Slow:
                Actions[THSharpAction.Slow] = false;
                VisibleHitbox.Alpha         = 0;
                break;

            //Mouse Stuff
            case THSharpAction.Shoot:
                Actions[THSharpAction.Shoot] = false;
                break;
            }

            //sendPacket(VitaruAction.None, action);
        }
Exemple #3
0
        protected virtual void Pressed(THSharpAction action)
        {
            switch (action)
            {
            //Keyboard Stuff
            case THSharpAction.Up:
                Actions[THSharpAction.Up] = true;
                break;

            case THSharpAction.Down:
                Actions[THSharpAction.Down] = true;
                break;

            case THSharpAction.Left:
                Actions[THSharpAction.Left] = true;
                break;

            case THSharpAction.Right:
                Actions[THSharpAction.Right] = true;
                break;

            case THSharpAction.Slow:
                Actions[THSharpAction.Slow] = true;
                VisibleHitbox.Alpha         = 1;
                break;

            //Mouse Stuff
            case THSharpAction.Shoot:
                Actions[THSharpAction.Shoot] = true;
                break;
            }

            //sendPacket(action);
        }
Exemple #4
0
        protected override void Released(THSharpAction action)
        {
            base.Released(action);

            if (action == THSharpAction.Spell)
            {
                SpellDeactivate(action);
            }
        }
Exemple #5
0
        protected override void Pressed(THSharpAction action)
        {
            base.Pressed(action);

            if (action == THSharpAction.Spell)
            {
                SpellActivate(action);
            }
        }
        protected override void Pressed(THSharpAction action)
        {
            base.Pressed(action);

            if (action == THSharpAction.Increase)
            {
                SetRate = Math.Min(Actions[THSharpAction.Slow] ? Math.Round(SetRate + 0.05d, 2) : Math.Round(SetRate + 0.25d, 2), 2d);
            }
            if (action == THSharpAction.Decrease)
            {
                SetRate = Math.Max(Actions[THSharpAction.Slow] ? Math.Round(SetRate - 0.05d, 2) : Math.Round(SetRate - 0.25d, 2), 0.25d);
            }
        }
Exemple #7
0
        protected virtual bool SpellActivate(THSharpAction action)
        {
            if (Energy >= TouhosuPlayer.EnergyCost && !SpellActive)
            {
                if (TouhosuPlayer.EnergyDrainRate == 0)
                {
                    Energy -= TouhosuPlayer.EnergyCost;
                }

                SpellActive    = true;
                SpellStartTime = Time.Current;
                Spell?.Invoke(action);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #8
0
 protected virtual void SpellDeactivate(THSharpAction action)
 {
     SpellActive = false;
 }