Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在释放鼠标关节移动它时获得精灵的确切位置(即使精灵可能仍在移动)。我相信它应该在 ccTouchesEnded 方法中编码,但我不知道该怎么做。谢谢你的帮助。
如果您想知道释放水龙头时精灵的位置,请执行以下操作:
-(void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint pos = sprite.position; }