2017年6月17日星期六

There are two ways to call the objects to process while they are touched on the screen. One spends time, and the other one spends space.

The time spent way for few objects is to call all objects one by one to calculate whether the touched points are within the scope of the objects projected on the screen flat and then do something each cycle.

The space spent way for lots of objects is to assign the object references together with the pixels while projecting the dimensional objects to the screen flat and later call the objects directly by the references at the positions when they are touched.

没有评论:

发表评论