public AnimationScript(string animationScriptJSONFileName) { isLooping = true; animationPatternIndex = 0; AnimationScriptJSONParser animationScriptJSONParser = new AnimationScriptJSONParser(animationScriptJSONFileName); InitializeAnimationScript(animationScriptJSONParser); spritesheet = Resources.LoadAll(UtilityFunctions.UNIT_SPRITESHEET_FILE_PATH + spritesheetFileName); }
private void InitializeAnimationScript(AnimationScriptJSONParser animationScriptJSONParser) { nameID = animationScriptJSONParser.GetNameID(); spritesheetFileName = animationScriptJSONParser.GetSpritesheetFileName(); animationPatterns = animationScriptJSONParser.GetAnimationPatterns(); }