Пример #1
0
    private void Move(Config.Command command)
    {
        float accuracy = beatManager.GetAccuracy();

        if (accuracy >= 0)
        {
            if (!stepped)
            {
                stepped = true;

                if (accuracy < beatManager.deltaTime / 2)
                {
                    gameField.CommandToBeat(command, scoreHigh, true);
                }
                else
                {
                    gameField.CommandToBeat(command, scoreLow, false);
                }

                gameField.StepUpdate();
            }
        }
        else
        {
            gameField.CommandToBeat(Config.Command.MISS, 0, false);             // passo 0, in quanto l'argomento è irrilevante
        }
    }
Пример #2
0
    public void CommitCommand()
    {
        switch (currentCommand)
        {
        case Config.Command.DOWN:
        {
            for (int i = 0; i < moveMagnitude; i++)
            {
                Move(Config.Direction.Down());
            }
            transform.eulerAngles = new Vector3(0, 270, 0);
            roll.Play("C4D Animation Take");
        }
        break;

        case Config.Command.UP:
        {
            for (int i = 0; i < moveMagnitude; i++)
            {
                Move(Config.Direction.Up());
            }
            transform.eulerAngles = new Vector3(0, 90, 0);
            roll.Play("C4D Animation Take");
        }
        break;

        case Config.Command.RIGHT:
        {
            for (int i = 0; i < moveMagnitude; i++)
            {
                Move(Config.Direction.Right());
            }
            transform.eulerAngles = new Vector3(0, 180, 0);
            roll.Play("C4D Animation Take");
        }
        break;

        case Config.Command.LEFT:
        {
            for (int i = 0; i < moveMagnitude; i++)
            {
                Move(Config.Direction.Left());
            }
            transform.eulerAngles = new Vector3(0, 0, 0);
            roll.Play("C4D Animation Take");
        }
        break;

        case Config.Command.NULL:
        {
            ResetStat();
            //score -= 10;
            message = Config.Messages.Miss();
            Jump();
        }
        break;
        }

        currentCommand = Config.Command.NULL;
    }
Пример #3
0
    public void PushCommand(Config.Command command, int score, bool maxPrecision)
    {
        int deltaScore = 0;

        if (command == Config.Command.MISS)
        {
            ResetStat();
            deltaScore  = -50 * multiplier * baseMultiplier;
            this.score -= 50 * multiplier * baseMultiplier;
            message     = Config.Messages.Async();
            SoundEffectManager.main.PlayError();
        }
        else if (command == Config.Command.DAMAGE)
        {
            ResetStat();
            deltaScore  = -300 * multiplier * baseMultiplier;
            this.score -= 300 * multiplier * baseMultiplier;
            ResetStat();
            message = Config.Messages.Bad();
        }
        else if (command == Config.Command.ATTACK)
        {
            deltaScore  = +300 * multiplier * baseMultiplier;
            this.score += 300 * multiplier * baseMultiplier;
            message     = Config.Messages.Bad();
        }
        else if (command == Config.Command.DESTROY)
        {
            deltaScore  = 75 * score;
            this.score += deltaScore;
            message     = Config.Messages.Bad();
        }
        else
        {
            currentCommand = command;
            UpgradeStat();
            catchedBeats++;
            deltaScore  = score * multiplier * baseMultiplier;
            this.score += score * multiplier * baseMultiplier;
//						if (maxPrecision) {
//								message = Config.Messages.LikeAGod ();
//								emitter.PlayGod ();
//						} else {
//								message = Config.Messages.Good ();
//								emitter.PlayGood ();
//						}
            SoundEffectManager.main.PlayClap();
        }

        if (deltaScore != 0)
        {
            FlyPoints(deltaScore);
        }
    }
Пример #4
0
//	public void CommandToBeat(Config.Command command)
//	{
//		// beat.Move(direction);
//		beat.PushCommand(command);
//	}

    public void CommandToBeat(Config.Command command, int score, bool maxPrecision)
    {
        beat.PushCommand(command, score, maxPrecision);
    }