objective c - How to compare SKSpriteNode textures -
I am making a game with the Sprite kit when there is a collision, I would like to retrieve the image of the SK Printnode, which Depending on the image of the monster, by colliding with my throw, different point values can be assigned. I think the comparison of SKSpriteNode's texture property could work. I have tried the following code, but my statement is never asked. any suggestion?
- (zero) projectile: (ssprintnod *) was projected in colloidwith monster: (ssprintnode *) monster {scales * texx = [scalched texture with image name: @ "imgpl"] ;; If ([[monster texture] aval: tex]] {nslog (@ "this works"); }}
Yes, a comparison of two images / textures using UIImage is.
- (BOOL) Image: (UIImage *) image1 isqualTo: (UIImage *) image2 {NSDT * data1 = UIImagePNG report (image1); NSDTA * Data2 = UIIMPNGRipation (Image 2); Return [data 1 equaul: data2]; }
Comments
Post a Comment