02 2013 档案
摘要:DOM Core节点操作查找节点:$()插入节点:append(), appendTo(), prepend(),prependTo(),after(), insertAfter(), before(), insertBefore()删除节点:remove(), empty()复制节点:clone()替换节点:replaceWith(), replaceAll()包裹节点:wrapAll(), wrap(),wrapinner()属性操作get/set属性:attr('属性')删除属性:removeAttr()class操作get class:attr('class
阅读全文
摘要:1:选择器一般前面是$(something),$()内部会自动使用loop寻找参数指定的元素Selector type CSS jQuery What it does Tag name p{} $('p') selects all 'p' in the document ID #some-id {} $('#some-id') selects the single element in the document that has as ID of ...
阅读全文
摘要:3 ways to define a JavaScript classIntroductionJavaScript is a very flexible object-oriented language when it comes to syntax. In this article you can find three ways of defining and instantiating an object. Even if you have already picked your favorite way of doing it, it helps to know some alterna
阅读全文
摘要:ScriptingAre you using the right algorithm? Selecting the right algorithm for a task yields much better optimization than any other code tweaking you might do. Note that the best algorithm is not always the one with the lowest average complexity. For small datasets, it is often better to use a slow
阅读全文
摘要:Unity内部的脚本,是通过附加自定义脚本对象到游戏物体组成的。在脚本对象内部不同的函数被特定的事件调用。最常用的列在下面:Awake: 在MonoBehavior创建后就立刻调用Start: 将在MonoBehavior创建后在该帧Update之前,在该Monobehavior.enabled == true的情况下执行。当MonoBehavior没有定义[ExecuteInEditMode]时 总结:我们尽量将其他Object的reference设置等事情放在Awake处理。然后将这些reference的Object的赋值设置放在Start()中来完成。当MonoBehavior有定义[.
阅读全文
摘要:http://forum.unity3d.com/threads/44911-2-cameras-running-the-same-time1: 2个camera同时显示在一个屏幕里It is certainly possible to have multiple cameras at once. There are a couple things to know that will help with this:- Cameras have a "depth" property. This determines which order the cameras will d
阅读全文
摘要:Unity3D + C#: Cloning the Content of a Serializable ClassFound a pretty simple and neat method for cloning the contents of a serializable class from one to another:http://stackoverflow.com/questions/78536/cloning-objects-in-c-sharpHere's a copy of the script (for Unity use), to make your life ea
阅读全文
摘要:C# Object Clone WarsCloning C# objects is one of those things that appears easy but is actually quite complicated with many "gotchas." This article describes the most common ways to clone a C# object.Shallow vs. Deep CloningThere are two types of object cloning: shallow and deep. A shallow
阅读全文
摘要:How to make a mini map for your scene in Unity3d This is my first tutorial on Unity, kinda nervous writing it... Anyway have you guys ever play Hitman, Dynasty Warrior, Starcraft or any RTS games? Usually at the bottom left of those games, there's a 2d map showing where the players are and where
阅读全文
摘要:水果类(fruits):西红柿tomato菠萝pineapple西瓜watermelon香蕉banana柚子shaddock(pomelo)橙子orange苹果apple柠檬lemon樱桃cherry桃子peach梨pear枣Chinesedate(去核枣pitteddate)椰子coconut草莓strawberry树莓raspberry蓝莓blueberry黑莓blackberry葡萄grape甘蔗sugarcane芒果mango木瓜pawpaw或者papaya杏子 apricot油桃nectarine柿子persimmon石榴pomegranate榴莲jackfruit槟榔果arecan
阅读全文
摘要:position有四种relative, absolute, static(默认), fixed, 其中relative不长用来对block element定位,但是relative和absolute用来标识其contain 的子是按照他们的位置做references的。Relative:1: 一般用法<style> div#outer { position: relative; width: 750px; height: 500px; margin: 0px auto; background-color: #369;...
阅读全文

浙公网安备 33010602011771号