Hii, i am trying to create one memory game. In which i can click on number of prefabs(cubes) which are present

there.Now i want to apply condition that, unless i'll click on certain number of cubes, i cant go to next scene.

Eg: If we r having 3 cubes present on scene, and i need to click on 'two' correct one cubes.Now here how can i check that they are clicked on correct one?

we can move to further scene if and if only when we confirmed that one has correctly clicked on two correct cubes.

If my question seems incomplete, then also let me know , i'll try to explore it.

Any help will be helpful..

Thnks,

well if you are asking for some especific prefabs, then you need to have 3 or n number of booleans, then in the update, on a foreach touch, make a raycast to the touch.position, then check if the raycast hit one of your designated prefabs, if so, turn a bool on, continue this proces for your n prefabs/touches, and if all your booleans are on, then make an Application.Load(scene)

hope this is the answer you are looking for

ok no problem.... i got part of soln... in this way...

function Update () { if ( Input.GetMouseButtonDown(0))

{ var hit : RaycastHit;

var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);

if (Physics.Raycast (ray, hit, 100.0))

{ Application.LoadLevel ("good_work_01");

}

}

}

so now using raycasting i can go to nxt scene.so anybody plz tel me how can use this for checking 2 or n number of cubes. I mean to say when n number of cubes will be clicked, then only he can move to the next level

so what should be the changes needed in this code....?