hiteshsuthar / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Hotspots don't take into account layers. #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create two hotspots from sprites.
2. Put one at depth 0 and one at depth 1

What is the expected output?

The one that is visibly on top fires.

What do you see instead?

The first one that comes up when iterating through them fires.

What version of Rokon are you using?

Latest

On which version of Android are you experiencing this?

Please provide any additional information below.

Original issue reported on code.google.com by Jor...@gmail.com on 10 Jan 2010 at 5:43

GoogleCodeExporter commented 8 years ago
may be this solution help you (in Rokon.java):

    private Hotspot temp_hotspot_1 = null;
    private Hotspot temp_hotspot_2 = null;

     public void UpToTopHotspot(Hotspot hotspot){

           for(l = 0; l < MAX_HOTSPOTS; l++){
               if (hotspotArr[l] != null){
                   if (hotspotArr[l].equals(hotspot)){
                       temp_hotspot_1 = hotspotArr[l];
//                     old_idx = l;
                       break;
                   }
               }
           }

           Hotspot[] H_arr_copy = hotspotArr.clone();
           if (temp_hotspot_1 != null){
               temp_hotspot_2 = H_arr_copy[0];
               H_arr_copy[0] = temp_hotspot_1;
               H_arr_copy[l] = temp_hotspot_2;
           }
           else {
               Debug.print("fail copy to arr");
               throw new NullPointerException("id is null");}
           hotspotArr = H_arr_copy;
       }

Original comment by archj...@gmail.com on 10 Jan 2010 at 8:13

GoogleCodeExporter commented 8 years ago
Rokon 2 is on the way, all current Issues are obsolete

Original comment by rtaylor205@gmail.com on 24 May 2010 at 3:31