예제 #1
0
파일: PacMan.cs 프로젝트: andresimon/PacMan
    public void SetDifficultyForLevel(int level)
    {
        LevelDifficulty diff = diffManager.GetDifficulty(level);

        if (diff != null)
        {
            moveSpeed = diff.pacManSpeed;
        }
    }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        DiffcultyDisplayer.text = difficulty.GetDifficulty().ToString();
        if (Input.GetKeyDown(KeyCode.U))
        {
            score.SetScore(980);
        }

        if (Input.GetKeyDown(KeyCode.Y))
        {
            score.SetScore(1980);
        }
    }
예제 #3
0
파일: Ghost.cs 프로젝트: andresimon/PacMan
    public void SetDifficultyForLevel(int level)
    {
        LevelDifficulty diff = diffManager.GetDifficulty(level);

        if (diff != null)
        {
            scatterModeTimes = diff.scatterModeTimes;
            chaseModeTimes   = diff.chaseModeTimes;

            frightenedDuration = diff.frightenedDuration;
            startingBlinkingAt = diff.startingBlinkingAt;

            switch (ghostType)
            {
            case GhostType.Red:
                break;

            case GhostType.Pink:
                releaseTime = diff.pinkReleaseTime;
                break;

            case GhostType.Blue:
                releaseTime = diff.blueReleaseTime;
                break;

            case GhostType.Orange:
                releaseTime = diff.orangeReleaseTime;
                break;

            default:
                break;
            }

            if (currentMode == Mode.Consumed)
            {
                levelSpeedIncrement = diff.consumedSpeedIncrement;
            }
            else
            {
                levelSpeedIncrement = diff.speedIncrement;
            }
        }
    }