public CocoPieceBuilder() { this.settings = DependencyService.Get<ISetttingsProvider>(DependencyFetchTarget.GlobalInstance); this.cache = CCSpriteFrameCache.SharedSpriteFrameCache; var set = settings["chess-set"]; var chessSet = JsonConvert.DeserializeObject<ChessSet>(set); if (chessSet != null && !string.IsNullOrEmpty(chessSet.FilePath)) { this.cache.AddSpriteFrames(chessSet.FilePath); } else { // default value this.cache.AddSpriteFrames("hd/sprites.plist"); } }
public CocoPieceBuilder() { this.settings = DependencyService.Get <ISetttingsProvider>(DependencyFetchTarget.GlobalInstance); this.cache = CCSpriteFrameCache.SharedSpriteFrameCache; var set = settings["chess-set"]; var chessSet = JsonConvert.DeserializeObject <ChessSet>(set); if (chessSet != null && !string.IsNullOrEmpty(chessSet.FilePath)) { this.cache.AddSpriteFrames(chessSet.FilePath); } else { // default value this.cache.AddSpriteFrames("hd/sprites.plist"); } }