Exemplo n.º 1
0
        internal CustomSkill(TSPlayer player, CustomSkillDefinition skillDefinition, int levelIndex)
        {
            PlayerName    = player.Name;
            Player        = player;
            Definition    = skillDefinition;
            LevelIndex    = levelIndex;
            StartLocation = new Vector2(player.X, player.Y);
            SkillState    = new SkillState(this);

            if (levelIndex < 0 || levelIndex >= skillDefinition.Levels.Count)
            {
                throw new ArgumentOutOfRangeException($"{nameof(levelIndex)}");
            }
        }