- 博客(294)
- 资源 (3)
- 收藏
- 关注
原创 Unity StrangeIoC框架
Unity StrangeIoC(一)正式之前先说说基础的概念:首先是MVC框架,MVC框架的思路是将业务逻辑、数据、界面显示分离,网上很多关于MVC的资料,这里不再过多的描述了。下面截图来自wikipedia的mvc框架:然后是控制反转(包括依赖注入和依赖查找),控制反转也是著名框架spring框架的核心。对于控制反转(Inversion of Con
2016-10-06 23:14:43 7554 1
原创 Unity资源热更之AssetBundle(3)———新版本AssetBundle
之前我们介绍了老版本的AssetBundle,在文章最后我们提到了在生成AB包的时候同时生成依赖关系信息文件。这样加载的时候就能够自动加载所有依赖项。而新版的AssetBundle正是采用的这样的方式。下面我来介绍一下:1.Unity5.x的AssetBundle的新功能。为每个资源添加了AssetBundleName属性,我们可以通过Editor中的资源可视化视图下方为资源设置
2016-09-21 00:47:43 18117 12
原创 Unity资源热更之AssetBundle(2)———旧版本AssetBundle
尊重原创,转载请注明出处,谢谢! http://blog.csdn.net/y1196645376/article/details/52567171这篇文章主要讲的是旧版的AssetBundle打包一系列方案。1.API介绍:a.BuildPipeline.BuildAssetBundle :打包常规资源生成AssetBundle.Object mainAsset: 指定
2016-09-18 10:15:24 8000 1
原创 Unity资源热更之AssetBundle(1)———基本介绍
聊到热更就必须先了解AssetBundle. 1.AssetBundle是什么呢?AssetBundles 是有 Unity 编辑器在编辑环境中(enit-time)创建的一些列的文件,这些文件可以被用在项目的运行环境中(run-time)。 AssetBundles 可以包括的资源文件有模型文件(models)、材质(materials)、纹理(textures)和场景(scenes)。Asse
2016-09-16 18:33:44 26773 6
原创 Unity 游戏存档之XML实现
这篇文章已经是我写的XML和JSON应用系列的第三篇了,有了前面两篇的基础。这篇文章读起来应该不是很困难。当然如果你是直接看的这篇文章吃力的话可以先去看看前面两篇文章。 这篇文章主要讲述如何使用对游戏进行存档。1.所需脚本:( 工程Scripts/Save文件夹下的所有脚本 ) DataBase,DataItem,GameData,GameDataManager,XmlSave2.脚本简介:
2016-09-15 22:07:07 4873
原创 Unity利用Xml和Json保存场景
之前已经简单介绍了XML和JSON的基本使用方法。这里我就介绍一个例子来对XML和JSON进行实战应用 --------- 场景的保存和热更。提前Ps : 所讲工程内容最后都会给出源码地址。1.首先你得有一个场景。这个迷宫地形我搭了好久。。可以看到地图中有个环境Env,人物Player,灯光Light,UGUI事件系统EventSystem,画布Canvas。Ini
2016-09-15 16:53:43 9501 9
原创 Unity序列化之XML,JSON--------合成与解析
最近在学热更新,涉及到资源热更,所以就了解了XML,JSON相关的东西。这方面网上资料还是比较多的,所以这里主要是总结一下基本使用方法和一些应用的Demo。1.先介绍一下 XML 和 JSON 是什么东西吧? (1)XML扩展标记语言 (Extensible Markup Language, XML) ,用于标记电子文件使其具有结构性的标记语言,可以用来标记数据、定义
2016-09-15 02:46:08 10476 2
原创 Unity LZMA GZIP 压缩、解压文件 和 打包文件夹 (支持进度回调)
我们知道在Unity5.x开始推出新的AssetBundle打包策略,给出的新的打包以及解包的Api。在处理资源依赖关系的时候较旧版本的显得方便了许多。然而,在使用的过程中我们发现,新的解包Api( AssetBundle.CreateFromFile )不支持压缩过的AssetBundle。也就是说要求在打包AssetBundle的时候要求使用 BuildAssetBundleOptio
2016-09-10 09:51:12 13467 21
原创 lua学习(5)______table表和函数
今天我们所讲的table表和函数都是lua中最重要也是最核心的基础类型,包括后面许多lua的特性都是由这两个衍生出来的。所以这节大家需要仔细学习,把细节弄明白。首先是table表:如果大家学过其他编程语言,可能会知道数据结构这样一个概念。数据结构就是程序中相互之间存在一种或多种特定关系的数据元素的集合。恩这么说可能有点抽象,比如说C语言中的数组、结构体、链表各自就是一种数据
2016-09-06 15:34:30 4559 1
原创 lua学习(4)_____表达式、语句
前面讲完了lua的基本类型,现在我们来看看lua表达式和语句语法的特别之处。1.表达式:讲表达式肯定就要先从操作符入手,其他的语言一般操作符分为算术操作符、关系操作符、逻辑操作符。不过lua中还有一个字符串连接操作符。先从算术操作符讲起:lua支持常规的算术操作符有:一元的"-"(负号), 二元的 "+"(加号), "-"(减号), "*"(乘号), "
2016-09-05 02:51:32 1918 1
原创 lua学习(3)______lua中的基本类型
这章我们来了解lua中变量的基本类型。Lua中一共有8种基础类型:nil(空)、boolean(布尔)、number(数字)、string(字符串)、userdata(自定义类型)、function(函数)、thread(线程)和 table(表)。不过这篇暂时不对userdata和thread进行介绍,后面文章我们会详细介绍这两种类型的。首先看这段代码:
2016-09-01 22:36:20 4071
原创 拆点+BFS______Meeting( hdu 5521 2015区域赛沈阳站 )
Problem DescriptionBessie and her friend Elsie decide to have a meeting. However, after Farmer John decorated hisfences they were separated into different blocks. John's farm are divided into n
2016-09-01 18:55:51 988
原创 lua学习(2)_____lua的注释和全局变量、局部变量
经过上节的介绍想必大家已经成功运行过lua代码了。下面我们真正的来接触lua基本语法了。1.注释语法Lua语言有自己独特的注释语法,同样分为行注释和块注释。行注释:和C语言很像,以--开头,那么这行之后的字符会被当做注释处理。(--等同于c语言的//)块注释:以--[[ 开头,以 ]] 结尾,在这之间的所有字符(可以跨多行)会被当做注释处
2016-08-31 21:03:13 10681
原创 lua学习(1)_____配置lua运行环境
Lua脚本的用途我就不多说了吧,都开始学Lua了一定知道它的用途首先我先介绍一下如何配置Lua脚本编译环境吧。1.可以去这里下载Lua的库: 链接: http://pan.baidu.com/s/1qXSfyQo 密码: 83eg下载好了之后解压到你喜欢的一个位置。比如我就放在了: E:\Yzl\ 这里。然后配置环境变量加上 [你的位置]\lua.
2016-08-30 23:04:41 1476
原创 概率DP_____ATM Mechine( hdu 5781 2016多校第五场)
Problem DescriptionAlice is going to take all her savings out of the ATM(Automatic Teller Machine). Alice forget how many deposit she has, and this strange ATM doesn't support query deposit. The o
2016-08-28 19:26:05 854
原创 中国剩余定理+容斥_____Lucky7( hdu 5768 2016多校第四场 )
Problem DescriptionWhen ?? was born, seven crows flew in and stopped beside him. In its childhood, ?? had been unfortunately fall into the sea. While it was dying, seven dolphins arched its body a
2016-08-28 16:47:48 830
原创 树形DP______Tree Cutting( POJ 2378 )
DescriptionAfter Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1 Bessie, feeling vindictive, decided to sabotage Farmer John's network by cutting power to
2016-08-25 08:17:56 635
原创 树形DP____AllenLSY( POJ 2378 )
DescriptionAfter Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1 Bessie, feeling vindictive, decided to sabotage Farmer John's network by cutting power to
2016-08-24 23:31:07 601
原创 微分方程_______Rower Bo( HDU 5761 2016多校第三场)
Problem DescriptionThere is a river on the Cartesian coordinate system,the river is flowing along the x-axis direction.Rower Bo is placed at (0,a) at first.He wants to get to origin (0,0) by
2016-08-24 21:39:16 600
原创 map+组合数学_____Eureka( POJ 5738 2016多校第二场)
roblem DescriptionProfessor Zhang draws n points on the plane, which are conveniently labeled by 1,2,...,n. The i-th point is at (xi,yi). Professor Zhang wants to know the number of best set
2016-08-24 19:57:06 596
原创 树形DP______TELE( POJ 1155 )
DescriptionA TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the f
2016-08-24 14:29:53 563
原创 树形DP______Apple Tree( POJ 2486 )
DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tree. There are N nodes in the tree. Each node has an amount of apples. Wshxzt starts her happy trip
2016-08-24 01:06:35 460
原创 树形DP_______Anniversary party( POJ 2342 )
DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor rela
2016-08-21 23:00:38 535
原创 sg函数+数学_________Stone game( hdu 5865 2016多校第十场 )
Problem DescriptionBirdstorm and hahaha are playing a game. Given a DAG (Directed acyclic graph) with n nodes and m edges. There are total k stones on the nodes and each node can contains more tha
2016-08-21 17:24:07 1132
转载 博弈论!!!
没事扯两句虽然在OI界好像博弈题并不是很多(显然是我见识少),然而在ACM中似乎是很常见的…刷多校看题典什么的都会遇到,然后题解又往往只有简略的一句话:”暴力dp即可”“暴力维护SG函数即可”这种. 所以还是花了一个多星期学习了一下这个玄学的东西… 其实严格来说博弈论完全不能算是算法对吧…算法资料《由感性认识到理性认识——透析一类搏弈游戏的解答过程》 by
2016-08-21 13:45:25 1189
原创 树形DP______Rebuilding Roads( POJ 1947 )
DescriptionThe cows have reconstructed Farmer John's farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. The cows didn't have time to rebuild any extra road
2016-08-21 13:28:15 453
原创 树形DP_____Party at Hali-Bula( POJ 3342 )
DescriptionDear Contestant,I'm going to have a party at my villa at Hali-Bula to celebrate my retirement from BCM. I wish I could invite all my co-workers, but imagine how an employee can enjoy
2016-08-21 02:08:35 572
原创 树形DP_______Strategic game( POJ 1463 )
DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must d
2016-08-20 23:54:50 455
原创 树形DP______Bribing FIPA( POJ 3345 )
DescriptionThere is going to be a voting at FIPA (Fédération Internationale de Programmation Association) to determine the host of the next IPWC (International Programming World Cup). Benjamin Ben
2016-08-20 14:49:12 514
原创 nim博弈_______Crazy Calendar( lightoj 1393 )
Description2011 was a crazy year. Many people all over the world proposed on 11-11-11, married on 11-11-11, some even went through surgery only to have 11-11-11 as their child's birth date. How cr
2016-08-20 00:30:24 850
原创 帕斯卡公式+Lucas定理______DP?( hdu 3944 )
Problem DescriptionFigure 1 shows the Yang Hui Triangle. We number the row from top to bottom 0,1,2,…and the column from left to right 0,1,2,….If using C(n,k) represents the number of row n,
2016-08-18 01:41:46 3573
原创 数学推导______Different Sums( hdu 5847 2016多校第九场)
Problem DescriptionA subsum of the sequence is sum of one or more consecutive integers of it. You are given an integer N(1≤N≤2000 ). Your task is to make a sequence of integers which are less th
2016-08-18 00:25:28 1200
原创 行列式求值+逆元_____Intersection is not allowed!( hdu 5852 2016多校第九场)
Problem DescriptionThere are K pieces on the chessboard.The size of the chessboard is N*N.The pieces are initially placed on the top cells of the board.A piece located on (r, c) can be
2016-08-17 00:21:18 1640
原创 树形dp____Magic boy Bi Luo with his excited tree( hdu 5834 2016ccpc网络赛)
Problem DescriptionBi Luo is a magic boy, he also has a migic tree, the tree has N nodes , in each node , there is a treasure, it's value is V[i], and for each edge, there is a cost C[i], wh
2016-08-16 01:37:43 823
原创 奇计淫巧______bitset优化
bitset可以当作一个bool型数组考虑,bitset bs; 可以考虑成一个数组bool bs[N]。相关操作:bs.set(); 全部置1,bs.reset()全部置0;bs.set(pos);等价于bs[pos]=1,bs.reset(pos)等价于bs[pos]=0;最重点的来了,bitset a, b;!a //
2016-08-14 08:39:39 2571
原创 dp+bitset优化______La Vie en rose( hdu 5745 2016多校第二场)
Problem DescriptionProfessor Zhang would like to solve the multiple pattern matching problem, but he only has only one pattern string p=p1p2...pm. So, he wants to generate as many as possible pa
2016-08-14 08:36:23 1135
原创 贪心______Keep On Movin( hdu 5744 2016多校第二场 )
DescriptionProfessor Zhang has kinds of characters and the quantity of the i-th character is ai. Professor Zhang wants to use all the characters build several palindromic strings. He also wants
2016-08-13 22:23:14 584
原创 数学+贪心_____It's All In The Mind( hdu 5742 2016多校第二场)
Problem Description Professor Zhang has a number sequence a1,a2,...,an. However, the sequence is not complete and some elements are missing. Fortunately, Professor Zhang remembers some properties of
2016-08-13 22:04:19 513
原创 数学向量推导______Acperience( hdu 5734 2016多校 )
Problem DescriptionDeep neural networks (DNN) have shown significant improvements in several application domains including computer vision and speech recognition. In computer vision, a particular
2016-08-13 21:52:33 503
原创 四面体内接圆_______tetrahedron( hdu 5733 2016多校第一场 )
Problem DescriptionGiven four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD. InputMultiple test cases (test cases ≤100).Each test cases contains a
2016-08-13 20:53:36 959
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人