Fix various minor typos (#17570)

This commit is contained in:
mogemimi 2017-03-23 10:30:42 +09:00 committed by minggo
parent 72d47c7f39
commit 8a327c77fa
8 changed files with 29 additions and 29 deletions

View File

@ -243,7 +243,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFile(const std::str
_builder = new (std::nothrow) FlatBufferBuilder();
Offset<NodeTree> nodeTree;
Offset<NodeAction> aciton;
Offset<NodeAction> action;
std::vector<Offset<flatbuffers::AnimationInfo>> animationInfos;
const tinyxml2::XMLElement* child = element->FirstChildElement();
@ -255,7 +255,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFile(const std::str
if (name == "Animation") // action
{
const tinyxml2::XMLElement* animation = child;
aciton = createNodeAction(animation);
action = createNodeAction(animation);
}
else if (name == "ObjectData") // nodeTree
{
@ -296,7 +296,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFile(const std::str
_builder->CreateVector(_textures),
_builder->CreateVector(_texturePngs),
nodeTree,
aciton,
action,
_builder->CreateVector(animationInfos));
_builder->Finish(csparsebinary);
@ -1351,7 +1351,7 @@ FlatBufferBuilder* FlatBuffersSerialize::createFlatBuffersWithXMLFileForSimulato
_builder = new (std::nothrow) FlatBufferBuilder();
Offset<NodeTree> nodeTree;
Offset<NodeAction> aciton;
Offset<NodeAction> action;
std::vector<Offset<flatbuffers::AnimationInfo> > animationInfos;
const tinyxml2::XMLElement* child = element->FirstChildElement();
@ -1363,7 +1363,7 @@ FlatBufferBuilder* FlatBuffersSerialize::createFlatBuffersWithXMLFileForSimulato
if (name == "Animation") // action
{
const tinyxml2::XMLElement* animation = child;
aciton = createNodeAction(animation);
action = createNodeAction(animation);
}
else if (name == "ObjectData") // nodeTree
{
@ -1402,7 +1402,7 @@ FlatBufferBuilder* FlatBuffersSerialize::createFlatBuffersWithXMLFileForSimulato
_builder->CreateVector(_textures),
_builder->CreateVector(_texturePngs),
nodeTree,
aciton,
action,
_builder->CreateVector(animationInfos));
_builder->Finish(csparsebinary);

View File

@ -1813,7 +1813,7 @@ std::string PremultipliedAlphaTest::subtitle() const
return "no black halo, particles should fade out\n animation should be normal";
}
void PremultipliedAlphaTest::readdPaticle(float delta)
void PremultipliedAlphaTest::readdParticle(float delta)
{
if (_hasEmitter)
{
@ -1856,7 +1856,7 @@ void PremultipliedAlphaTest::onEnter()
this->addChild(_emitter, 10);
_hasEmitter = true;
schedule(CC_SCHEDULE_SELECTOR(PremultipliedAlphaTest::readdPaticle), 1.0f);
schedule(CC_SCHEDULE_SELECTOR(PremultipliedAlphaTest::readdParticle), 1.0f);
}
// PremultipliedAlphaTest2

View File

@ -321,7 +321,7 @@ class PremultipliedAlphaTest : public ParticleDemo
public:
CREATE_FUNC(PremultipliedAlphaTest);
virtual void onEnter() override;
void readdPaticle(float delta);
void readdParticle(float delta);
virtual std::string title() const override;
virtual std::string subtitle() const override;
};

View File

@ -449,7 +449,7 @@ void RenderTextureTestDepthStencil::draw(Renderer *renderer, const Mat4 &transfo
_spriteDS->visit();
_renderCmds[2].init(_globalZOrder, transform, flags);
_renderCmds[2].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onBeforDraw, this);
_renderCmds[2].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onBeforeDraw, this);
renderer->addCommand(&_renderCmds[2]);
_spriteDraw->visit();
@ -484,7 +484,7 @@ void RenderTextureTestDepthStencil::onBeforeStencil()
// RenderState::StateBlock::_defaultState->setStencilOperation(RenderState::STENCIL_OP_REPLACE, RenderState::STENCIL_OP_REPLACE, RenderState::STENCIL_OP_REPLACE);
}
void RenderTextureTestDepthStencil::onBeforDraw()
void RenderTextureTestDepthStencil::onBeforeDraw()
{
glStencilFunc(GL_NOTEQUAL, 1, 0xFF);

View File

@ -77,7 +77,7 @@ private:
cocos2d::CustomCommand _renderCmds[4];
void onBeforeClear();
void onBeforeStencil();
void onBeforDraw();
void onBeforeDraw();
void onAfterDraw();
private:

View File

@ -236,7 +236,7 @@ Sprite3DUVAnimationTest::Sprite3DUVAnimationTest()
{
//the offset use to translating texture
_cylinder_texture_offset = 0;
_shining_duraion = 0;
_shining_duration = 0;
Size visibleSize = Director::getInstance()->getVisibleSize();
//use custom camera
@ -299,18 +299,18 @@ void Sprite3DUVAnimationTest::cylinderUpdate(float dt)
_cylinder_texture_offset = (_cylinder_texture_offset >1) ? 0 : _cylinder_texture_offset;
if(fade_in)
{
_shining_duraion += 0.5*dt;
if(_shining_duraion>1) fade_in = false;
_shining_duration += 0.5 * dt;
if (_shining_duration > 1) fade_in = false;
}
else
{
_shining_duraion -= 0.5*dt;
if(_shining_duraion<0) fade_in = true;
_shining_duration -= 0.5 * dt;
if (_shining_duration < 0) fade_in = true;
}
//pass the result to shader
_state->setUniformFloat("offset",_cylinder_texture_offset);
_state->setUniformFloat("duration",_shining_duraion);
_state->setUniformFloat("duration", _shining_duration);
}
//------------------------------------------------------------------
@ -950,9 +950,9 @@ void Sprite3DWithSkinTest::addNewSpriteWithCoords(Vec2 p)
animate->setSpeed(inverse ? -speed : speed);
animate->setTag(110);
animate->setQuality((Animate3DQuality)_animateQuality);
auto repeate = RepeatForever::create(animate);
repeate->setTag(110);
sprite->runAction(repeate);
auto repeat = RepeatForever::create(animate);
repeat->setTag(110);
sprite->runAction(repeat);
}
}

View File

@ -92,7 +92,7 @@ protected:
void cylinderUpdate(float dt);
float _cylinder_texture_offset;
float _shining_duraion;
float _shining_duration;
cocos2d::GLProgramState * _state;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)

View File

@ -1234,7 +1234,7 @@ var Sprite3DUVAnimationTest = Sprite3DTestDemo.extend({
_title:"Testing UV Animation",
_subtitle:"",
_cylinder_texture_offset:0,
_shining_duraion:0,
_shining_duration:0,
_state:null,
fade_in:true,
@ -1261,7 +1261,7 @@ var Sprite3DUVAnimationTest = Sprite3DTestDemo.extend({
cylinder.setGLProgramState(this._state);
this._state.setUniformFloat("offset", this._cylinder_texture_offset);
this._state.setUniformFloat("duration", this._shining_duraion);
this._state.setUniformFloat("duration", this._shining_duration);
//pass mesh's attribute to shader
var offset = 0;
@ -1292,18 +1292,18 @@ var Sprite3DUVAnimationTest = Sprite3DTestDemo.extend({
this._cylinder_texture_offset = this._cylinder_texture_offset > 1 ? 0 : this._cylinder_texture_offset;
if(this.fade_in){
this._shining_duraion += 0.5 * dt;
if(this._shining_duraion > 1)
this._shining_duration += 0.5 * dt;
if(this._shining_duration > 1)
this.fade_in = false;
}else{
this._shining_duraion -= 0.5 * dt;
if(this._shining_duraion < 0)
this._shining_duration -= 0.5 * dt;
if(this._shining_duration < 0)
this.fade_in = true;
}
//pass the result to shader
this._state.setUniformFloat("offset", this._cylinder_texture_offset);
this._state.setUniformFloat("duration", this._shining_duraion);
this._state.setUniformFloat("duration", this._shining_duration);
}
});