Home > other >  Plane war bullets don't come out, ask for help
Plane war bullets don't come out, ask for help

Time:09-23

Novice - see four or five times also didn't see it wrong,

CodePudding user response:

Why is move by? not

CodePudding user response:

Look at the code will be a problem, can only step by step debugging

CodePudding user response:

I'm better than the original poster is a novice, now even the plane how bullets fired all don't know,,,
What a great god can do me a favor and tell me a little, if one of the most simple way, a lot of things didn't learn,,,

CodePudding user response:

Void the HelloWorld: : CreateBullet float (dt)
{

PlanePos=myPlane - & gt; GetPosition ();
Sprite * bullut=Sprite: : createWithSpriteFrameName (" bullet_0. PNG ");
This - & gt; AddChild (bullut, 10);
Bullut - & gt; SetPosition (planePos. X, planePos. Y);

ActionInterval * bullutMove=MoveBy: : create (0.2, Point (0, visibleSize. Height + 20));
Bullut - & gt; RunAction (bullutMove);
Bullut - & gt; SetScale (0.5);
BullutArr. PushBack (bullut);

}
Added to the timer

CodePudding user response:

refer to the second floor DJGTXX response:
see code will be a problem, can only step by step debugging

Code is no problem, if the original poster zoder is 1, the background of, and not to reason is certainly zorder problem
  • Related