mirror of https://github.com/axmolengine/axmol.git
Fix various typos in comments and strings (#17410)
This commit is contained in:
parent
0e28e68d45
commit
cfbbc65c71
|
@ -716,7 +716,7 @@ var CameraCullingDemo = Camera3DTestDemo.extend({
|
||||||
this.addChild(layer3D, 0);
|
this.addChild(layer3D, 0);
|
||||||
this._layer3D = layer3D;
|
this._layer3D = layer3D;
|
||||||
|
|
||||||
// swich camera
|
// switch camera
|
||||||
cc.MenuItemFont.setFontName("Arial");
|
cc.MenuItemFont.setFontName("Arial");
|
||||||
cc.MenuItemFont.setFontSize(20);
|
cc.MenuItemFont.setFontSize(20);
|
||||||
|
|
||||||
|
@ -1110,7 +1110,7 @@ var FogTestDemo = Camera3DTestDemo.extend({
|
||||||
onTouchesMoved:this.onTouchesMoved.bind(this)
|
onTouchesMoved:this.onTouchesMoved.bind(this)
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// swich fog type
|
// switch fog type
|
||||||
var label1 = new cc.LabelTTF("Linear", "Arial", 20);
|
var label1 = new cc.LabelTTF("Linear", "Arial", 20);
|
||||||
var item1 = new cc.MenuItemLabel(label1, this.switchTypeCallback, this);
|
var item1 = new cc.MenuItemLabel(label1, this.switchTypeCallback, this);
|
||||||
item1.setUserData(0);
|
item1.setUserData(0);
|
||||||
|
|
|
@ -702,7 +702,7 @@ var SchedulerTest1 = TestNodeDemo.extend({
|
||||||
|
|
||||||
layer.schedule(this.doSomething);
|
layer.schedule(this.doSomething);
|
||||||
//UXLOG("retain count after schedule is %d", layer->retainCount());
|
//UXLOG("retain count after schedule is %d", layer->retainCount());
|
||||||
// 3 : (object-c viersion), but win32 version is still 2, because CCTimer class don't save target.
|
// 3 : (objective-c version), but win32 version is still 2, because CCTimer class don't save target.
|
||||||
|
|
||||||
layer.unschedule(this.doSomething);
|
layer.unschedule(this.doSomething);
|
||||||
//UXLOG("retain count after unschedule is %d", layer->retainCount());
|
//UXLOG("retain count after unschedule is %d", layer->retainCount());
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ var BMFontGlyphDesignerTest = AtlasDemo.extend({
|
||||||
return "Testing Glyph Designer";
|
return "Testing Glyph Designer";
|
||||||
},
|
},
|
||||||
subtitle:function () {
|
subtitle:function () {
|
||||||
return "You should see a font with shawdows and outline";
|
return "You should see a font with shadows and outline";
|
||||||
},
|
},
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -133,7 +133,7 @@ var MotionStreakTest1 = MotionStreakTest.extend({
|
||||||
// create the streak object and add it to the scene
|
// create the streak object and add it to the scene
|
||||||
this._streak = new cc.MotionStreak(2, 3, 32, cc.color.GREEN, s_streak);
|
this._streak = new cc.MotionStreak(2, 3, 32, cc.color.GREEN, s_streak);
|
||||||
this.addChild(this._streak);
|
this.addChild(this._streak);
|
||||||
// schedule an update on each frame so we can syncronize the streak with the target
|
// schedule an update on each frame so we can synchronize the streak with the target
|
||||||
this.schedule(this.onUpdate);
|
this.schedule(this.onUpdate);
|
||||||
|
|
||||||
var a1 = cc.rotateBy(2, 360);
|
var a1 = cc.rotateBy(2, 360);
|
||||||
|
|
|
@ -211,7 +211,7 @@ var TestWriteValueMap = fileUtilsBase.extend({
|
||||||
var booleanObject = true;
|
var booleanObject = true;
|
||||||
valueMap["data3"] = booleanObject;
|
valueMap["data3"] = booleanObject;
|
||||||
|
|
||||||
//add interger to the plist
|
//add integer to the plist
|
||||||
var intObject = 1024;
|
var intObject = 1024;
|
||||||
valueMap["data4"] = intObject;
|
valueMap["data4"] = intObject;
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ var TestWriteValueVector = fileUtilsBase.extend({
|
||||||
var booleanObject = true;
|
var booleanObject = true;
|
||||||
array[array.length] = booleanObject;
|
array[array.length] = booleanObject;
|
||||||
|
|
||||||
//add interger to the plist
|
//add integer to the plist
|
||||||
var intObject = 1024;
|
var intObject = 1024;
|
||||||
array[array.length] = intObject;
|
array[array.length] = intObject;
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ var DemoBigFlower = ParticleDemo.extend({
|
||||||
this._emitter.radialAccel = -120;
|
this._emitter.radialAccel = -120;
|
||||||
this._emitter.radialAccelVar = 0;
|
this._emitter.radialAccelVar = 0;
|
||||||
|
|
||||||
// tagential
|
// tangential
|
||||||
this._emitter.tangentialAccel = 30;
|
this._emitter.tangentialAccel = 30;
|
||||||
this._emitter.tangentialAccelVar = 0;
|
this._emitter.tangentialAccelVar = 0;
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ var RenderTextureSave = RenderTextureBaseLayer.extend({
|
||||||
|
|
||||||
saveCB:function (sender) {
|
saveCB:function (sender) {
|
||||||
if(!cc.sys.isNative){
|
if(!cc.sys.isNative){
|
||||||
cc.log("RenderTexture's saveToFile doesn't suppport on HTML5");
|
cc.log("RenderTexture's saveToFile doesn't support on HTML5");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var namePNG = "image-" + this._counter + ".png";
|
var namePNG = "image-" + this._counter + ".png";
|
||||||
|
|
|
@ -503,7 +503,7 @@ var ScheduleUsingSchedulerTest = SchedulerTestLayer.extend({
|
||||||
//----end9----
|
//----end9----
|
||||||
},
|
},
|
||||||
onExit: function() {
|
onExit: function() {
|
||||||
// should unscheudle here if it is not unscheduled before exit
|
// should unschedule here if it is not unscheduled before exit
|
||||||
this.unscheduleAll();
|
this.unscheduleAll();
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
|
@ -606,7 +606,7 @@ var Sprite3DReskinTest = (function(){
|
||||||
})();
|
})();
|
||||||
|
|
||||||
var Sprite3DWithOBBPerformanceTest = Sprite3DTestDemo.extend({
|
var Sprite3DWithOBBPerformanceTest = Sprite3DTestDemo.extend({
|
||||||
_title:"OBB Collison Performance Test",
|
_title:"OBB Collision Performance Test",
|
||||||
_subtitle:"",
|
_subtitle:"",
|
||||||
_drawOBB:null,
|
_drawOBB:null,
|
||||||
_drawDebug:null,
|
_drawDebug:null,
|
||||||
|
|
|
@ -1795,7 +1795,7 @@ var SpriteFrameAliasNameTest = SpriteTestDemo.extend({
|
||||||
// Animation using Sprite batch
|
// Animation using Sprite batch
|
||||||
//
|
//
|
||||||
// A cc.SpriteBatchNode can reference one and only one texture (one .png file)
|
// A cc.SpriteBatchNode can reference one and only one texture (one .png file)
|
||||||
// Sprites that are contained in that texture can be instantiatied as cc.Sprites and then added to the cc.SpriteBatchNode
|
// Sprites that are contained in that texture can be instantiated as cc.Sprites and then added to the cc.SpriteBatchNode
|
||||||
// All cc.Sprites added to a cc.SpriteBatchNode are drawn in one OpenGL ES draw call
|
// All cc.Sprites added to a cc.SpriteBatchNode are drawn in one OpenGL ES draw call
|
||||||
// If the cc.Sprites are not added to a cc.SpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient
|
// If the cc.Sprites are not added to a cc.SpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient
|
||||||
//
|
//
|
||||||
|
|
|
@ -146,7 +146,7 @@ var TextureCacheTest = TextureCacheTestBase.extend({
|
||||||
this.addChild(this._labelPercent);
|
this.addChild(this._labelPercent);
|
||||||
|
|
||||||
var texCache = cc.textureCache;
|
var texCache = cc.textureCache;
|
||||||
// load textrues
|
// load textures
|
||||||
texCache.addImageAsync("Images/HelloWorld.png", this.loadingCallBack, this);
|
texCache.addImageAsync("Images/HelloWorld.png", this.loadingCallBack, this);
|
||||||
texCache.addImageAsync("Images/grossini.png", this.loadingCallBack, this);
|
texCache.addImageAsync("Images/grossini.png", this.loadingCallBack, this);
|
||||||
texCache.addImageAsync("Images/grossini_dance_01.png", this.loadingCallBack, this);
|
texCache.addImageAsync("Images/grossini_dance_01.png", this.loadingCallBack, this);
|
||||||
|
|
|
@ -1577,7 +1577,7 @@ var TMXGIDObjectsTest = TileDemo.extend({
|
||||||
this.addChild(map, 0, TAG_TILE_MAP);
|
this.addChild(map, 0, TAG_TILE_MAP);
|
||||||
|
|
||||||
this.log("ContentSize:" + map.width + "," + map.height);
|
this.log("ContentSize:" + map.width + "," + map.height);
|
||||||
this.log("---. Iterating over all the group objets");
|
this.log("---. Iterating over all the group objects");
|
||||||
|
|
||||||
var group = map.getObjectGroup("Object Layer 1");
|
var group = map.getObjectGroup("Object Layer 1");
|
||||||
var array = group.getObjects();
|
var array = group.getObjects();
|
||||||
|
|
|
@ -546,7 +546,7 @@ local function TMXOrthoObjectsTest()
|
||||||
local drawNode = cc.DrawNode:create()
|
local drawNode = cc.DrawNode:create()
|
||||||
map:addChild(drawNode, 10)
|
map:addChild(drawNode, 10)
|
||||||
|
|
||||||
--------cclog("---: Iterating over all the group objets")
|
--------cclog("---: Iterating over all the group objects")
|
||||||
local group = map:getObjectGroup("Object Group 1")
|
local group = map:getObjectGroup("Object Group 1")
|
||||||
local objects = group:getObjects()
|
local objects = group:getObjects()
|
||||||
|
|
||||||
|
|
|
@ -682,7 +682,7 @@ function LabelGlyphDesigner.create()
|
||||||
layer:addChild(label1)
|
layer:addChild(label1)
|
||||||
label1:setPosition(cc.p(s.width/2, s.height/2))
|
label1:setPosition(cc.p(s.width/2, s.height/2))
|
||||||
Helper.titleLabel:setString("Testing Glyph Designer")
|
Helper.titleLabel:setString("Testing Glyph Designer")
|
||||||
Helper.subtitleLabel:setString("You should see a font with shawdows and outline")
|
Helper.subtitleLabel:setString("You should see a font with shadows and outline")
|
||||||
|
|
||||||
return layer
|
return layer
|
||||||
end
|
end
|
||||||
|
@ -1219,7 +1219,7 @@ function BMFontUnicode.create()
|
||||||
local layer = cc.Layer:create()
|
local layer = cc.Layer:create()
|
||||||
Helper.initWithLayer(layer)
|
Helper.initWithLayer(layer)
|
||||||
Helper.titleLabel:setString("LabelBMFont with Unicode support")
|
Helper.titleLabel:setString("LabelBMFont with Unicode support")
|
||||||
Helper.subtitleLabel:setString("You should see 3 differnt labels: In Spanish, Chinese and Korean")
|
Helper.subtitleLabel:setString("You should see 3 different labels: In Spanish, Chinese and Korean")
|
||||||
|
|
||||||
local s = cc.Director:getInstance():getWinSize()
|
local s = cc.Director:getInstance():getWinSize()
|
||||||
|
|
||||||
|
|
|
@ -520,7 +520,7 @@ function LabelFNTGlyphDesigner.create()
|
||||||
label1:setPosition(cc.p(s.width/2, s.height/2))
|
label1:setPosition(cc.p(s.width/2, s.height/2))
|
||||||
|
|
||||||
Helper.titleLabel:setString("New Label + .FNT file")
|
Helper.titleLabel:setString("New Label + .FNT file")
|
||||||
Helper.subtitleLabel:setString("Testing Glyph Designer: you should see a font with shawdows and outline")
|
Helper.subtitleLabel:setString("Testing Glyph Designer: you should see a font with shadows and outline")
|
||||||
return layer
|
return layer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -777,7 +777,7 @@ function LabelFNTUNICODELanguages.create()
|
||||||
local layer = cc.Layer:create()
|
local layer = cc.Layer:create()
|
||||||
Helper.initWithLayer(layer)
|
Helper.initWithLayer(layer)
|
||||||
Helper.titleLabel:setString("New Label + .FNT + UNICODE")
|
Helper.titleLabel:setString("New Label + .FNT + UNICODE")
|
||||||
Helper.subtitleLabel:setString("You should see 3 differnt labels:\nIn Spanish, Chinese, and Japanese")
|
Helper.subtitleLabel:setString("You should see 3 different labels:\nIn Spanish, Chinese, and Japanese")
|
||||||
|
|
||||||
local s = cc.Director:getInstance():getWinSize()
|
local s = cc.Director:getInstance():getWinSize()
|
||||||
|
|
||||||
|
|
|
@ -654,7 +654,7 @@ local function DemoBigFlower()
|
||||||
emitter:setRadialAccel(-120)
|
emitter:setRadialAccel(-120)
|
||||||
emitter:setRadialAccelVar(0)
|
emitter:setRadialAccelVar(0)
|
||||||
|
|
||||||
-- tagential
|
-- tangential
|
||||||
emitter:setTangentialAccel(30)
|
emitter:setTangentialAccel(30)
|
||||||
emitter:setTangentialAccelVar(0)
|
emitter:setTangentialAccelVar(0)
|
||||||
|
|
||||||
|
@ -725,7 +725,7 @@ local function DemoRotFlower()
|
||||||
emitter:setRadialAccel(-120)
|
emitter:setRadialAccel(-120)
|
||||||
emitter:setRadialAccelVar(0)
|
emitter:setRadialAccelVar(0)
|
||||||
|
|
||||||
-- tagential
|
-- tangential
|
||||||
emitter:setTangentialAccel(30)
|
emitter:setTangentialAccel(30)
|
||||||
emitter:setTangentialAccelVar(0)
|
emitter:setTangentialAccelVar(0)
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ local function DemoModernArt()
|
||||||
emitter:setRadialAccel(70)
|
emitter:setRadialAccel(70)
|
||||||
emitter:setRadialAccelVar(10)
|
emitter:setRadialAccelVar(10)
|
||||||
|
|
||||||
-- tagential
|
-- tangential
|
||||||
emitter:setTangentialAccel(80)
|
emitter:setTangentialAccel(80)
|
||||||
emitter:setTangentialAccelVar(0)
|
emitter:setTangentialAccelVar(0)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
-- Test #3 by David Deaco (ddeaco)
|
-- Test #3 by David Deaco (ddeaco)
|
||||||
|
|
||||||
--/**
|
--/**
|
||||||
-- * Impelmentation of RenderTextureSave
|
-- * Implementation of RenderTextureSave
|
||||||
--*/
|
--*/
|
||||||
local function RenderTextureSave()
|
local function RenderTextureSave()
|
||||||
local ret = createTestLayer("Touch the screen",
|
local ret = createTestLayer("Touch the screen",
|
||||||
|
@ -53,7 +53,7 @@ local function RenderTextureSave()
|
||||||
target:retain()
|
target:retain()
|
||||||
target:setPosition(cc.p(s.width / 2, s.height / 2))
|
target:setPosition(cc.p(s.width / 2, s.height / 2))
|
||||||
|
|
||||||
-- note that the render texture is a cc.Node, and contains a sprite of its texture for convience,
|
-- note that the render texture is a cc.Node, and contains a sprite of its texture for convenience,
|
||||||
-- so we can just parent it to the scene like any other cc.Node
|
-- so we can just parent it to the scene like any other cc.Node
|
||||||
ret:addChild(target, -1)
|
ret:addChild(target, -1)
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
--/**
|
--/**
|
||||||
-- * Impelmentation of RenderTextureIssue937
|
-- * Implementation of RenderTextureIssue937
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
-- local function RenderTextureIssue937()
|
-- local function RenderTextureIssue937()
|
||||||
|
@ -195,7 +195,7 @@ end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
-- --/**
|
-- --/**
|
||||||
-- -- * Impelmentation of RenderTextureZbuffer
|
-- -- * Implementation of RenderTextureZbuffer
|
||||||
-- --*/
|
-- --*/
|
||||||
|
|
||||||
-- local function RenderTextureZbuffer()
|
-- local function RenderTextureZbuffer()
|
||||||
|
|
|
@ -905,7 +905,7 @@ end
|
||||||
function Sprite3DWithOBBPerfromanceTest.create()
|
function Sprite3DWithOBBPerfromanceTest.create()
|
||||||
local layer = Sprite3DWithOBBPerfromanceTest.new()
|
local layer = Sprite3DWithOBBPerfromanceTest.new()
|
||||||
Helper.initWithLayer(layer)
|
Helper.initWithLayer(layer)
|
||||||
Helper.titleLabel:setString("OBB Collison Perfromance Test")
|
Helper.titleLabel:setString("OBB Collision Perfromance Test")
|
||||||
return layer
|
return layer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -787,7 +787,7 @@ local function TextureAlias()
|
||||||
sprite:setPosition(cc.p( s.width/3.0, s.height/2.0))
|
sprite:setPosition(cc.p( s.width/3.0, s.height/2.0))
|
||||||
ret:addChild(sprite)
|
ret:addChild(sprite)
|
||||||
|
|
||||||
-- this is the default filterting
|
-- this is the default filtering
|
||||||
sprite:getTexture():setAntiAliasTexParameters()
|
sprite:getTexture():setAntiAliasTexParameters()
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -1134,7 +1134,7 @@ end
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
local function TextureCache1()
|
local function TextureCache1()
|
||||||
local ret = createTestLayer("TextureCache: remove",
|
local ret = createTestLayer("TextureCache: remove",
|
||||||
"4 images should appear: alias, antialias, alias, antilias")
|
"4 images should appear: alias, antialias, alias, antialias")
|
||||||
local s = cc.Director:getInstance():getWinSize()
|
local s = cc.Director:getInstance():getWinSize()
|
||||||
|
|
||||||
local sprite = nil
|
local sprite = nil
|
||||||
|
@ -1180,7 +1180,7 @@ local function TextureDrawAtPoint()
|
||||||
|
|
||||||
local function draw(transform, transformUpdated)
|
local function draw(transform, transformUpdated)
|
||||||
local director = cc.Director:getInstance()
|
local director = cc.Director:getInstance()
|
||||||
assert(nil ~= director, "Director is null when seting matrix stack")
|
assert(nil ~= director, "Director is null when setting matrix stack")
|
||||||
director:pushMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW)
|
director:pushMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW)
|
||||||
director:loadMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW, transform)
|
director:loadMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW, transform)
|
||||||
|
|
||||||
|
@ -1225,7 +1225,7 @@ local function TextureDrawInRect()
|
||||||
"draws 2 textures using drawInRect")
|
"draws 2 textures using drawInRect")
|
||||||
local function draw(transform, transformUpdated)
|
local function draw(transform, transformUpdated)
|
||||||
local director = cc.Director:getInstance()
|
local director = cc.Director:getInstance()
|
||||||
assert(nullptr ~= director, "Director is null when seting matrix stack")
|
assert(nullptr ~= director, "Director is null when setting matrix stack")
|
||||||
director:pushMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW)
|
director:pushMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW)
|
||||||
director:loadMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW, transform)
|
director:loadMatrix(cc.MATRIX_STACK_TYPE.MODELVIEW, transform)
|
||||||
|
|
||||||
|
|
|
@ -629,7 +629,7 @@ local function TMXOrthoObjectsTest()
|
||||||
local drawNode = cc.DrawNode:create()
|
local drawNode = cc.DrawNode:create()
|
||||||
map:addChild(drawNode, 10)
|
map:addChild(drawNode, 10)
|
||||||
|
|
||||||
--------cclog("---: Iterating over all the group objets")
|
--------cclog("---: Iterating over all the group objects")
|
||||||
local group = map:getObjectGroup("Object Group 1")
|
local group = map:getObjectGroup("Object Group 1")
|
||||||
local objects = group:getObjects()
|
local objects = group:getObjects()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue