cocos2d iphone - cocos2dX setBlendFunc -


My image shows that it is too black I use the function setBlendFunc .

But when the phantom does not run animate, it will work. How can this be fixed, to run, does not work?

  CCSprite * effectSprite = CCSprite :: create ("init_black.png"); EffectSprite-> Setbendfunk (ccBlendFunc) {GL_ONE, GL_ONE}); SolidarSpritt * Enemy False = (SolidarPrint *) (enemy-> ObjectItInx (0)); CCARA * Status = Enemy Solider- & gt; Solidarposition; Status- & gt; Maintaining (); Cout & lt; & Lt; (CCString *) Status-> Object at Index (0)) - & gt; Intu () & lt; & Lt; Endl; EffectSprite-> Setup (CCP (CC string *) Position-> ObjectOutIndex (0)) -> gt; Intave (), ((seistring *) position-> ObjectItendex (1)) -> Intuue ()) ); This- & gt; AddChild (effectSprite); String effect string = "effect"; If (this-> direction) {msg.property [1] .append ("L"); } Other {msg.property [1] .append ("R"); } CCAnimate * effectAction = animate-> CreateWithKind (msg.property [1], effectString.c_str (), 2); EffectSprite- & gt; RunAction (effectAction); Status- & gt; Release (); It seems that there is a bug and the new version does not have that problem. Try this code with version 2.1.5 of Cocos 2D-X:  
  CCSprite someSprite = CCSprite.spriteWithFile ("some image"); CcBlendFunc someBlend = new ccBlendFunc (); SomeBlend.src = OGLES.GL_ONE; SomeBlend.dst = OGLES.GL_ONE; SomeSprite.BlendFunc = someBlend;    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -