Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        INVULNERABLE = false;

        switch (PlayerPrefs.GetString("Difficulty"))
        {
            case "Easy":
                WaveSystem.GameDifficulty = Difficulty.Easy;
                break;
            case "Normal":
                WaveSystem.GameDifficulty = Difficulty.Normal;
                break;
            case "Hard":
                WaveSystem.GameDifficulty = Difficulty.Hard;
                break;
            default:
                WaveSystem.GameDifficulty = Difficulty.Easy;
                break;
        }

        anim = GetComponent<Animator>();
        currentAtkState = anim.GetCurrentAnimatorStateInfo (player_StateAttackLayer);

        inputHandler = new InputHandler();
        IsAuraActive = false;

        //LevelSystem = new LevelSystem();
        //Skills = LevelSystem.GetPlayerSkills();
        //Skills.AddSkillPoint();
        Skills = new PlayerSkills (Equipment, audio, Accept, Reject);
        Skills.AddSkillPoints (WaveSystem.GameDifficulty);

        //get the proper amount of lives
        Lives = WaveSystem.LivesPerDifficulty[(int)WaveSystem.GameDifficulty];

        renderer.material.color = Color.red;
        knockback = new Vector3();
        Mass = 10f;

        Score = 0;

        Physics.IgnoreLayerCollision (9, 9);

        PlayerAnimation.animation["attack"].speed = 2.5f;
    }