|
-
Senior Member
var collisionRange:Number = (heroRadius + enemyRadius) * (heroRadius + enemyRadius);
This is not an expensive operation. Worse case scenario, you can simply run this code when it's needed. Or, as you said, you can also cache things in a data structure of some sort. Test to make sure that creating them on the fly is noticably slower then caching though as you want to be sue the cache is a good idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|