Home > other >  Ask how to realize data exchange between two objects?
Ask how to realize data exchange between two objects?

Time:09-17

I play games in the self-study, now has a problem, hope everybody to help give directions,
Now I want to achieve:
A gun shot a bullet, the enemy object so drop blood, guns and the two enemy object how to associate? The reflex those?

CodePudding user response:

Is the data exchange between the object to do

CodePudding user response:

reference qq_29799917 reply: 3/f
bullets class with a reference variable to hold the gun instance objects, bullets collision with the enemy, the enemy of life minus the bullets in the gun damage, and then back into the object pool recovery of bullets,
thank you, for a few days to finally know how to solve
  • Related