|
Hii, i'm trying to execute one function , but not able to complete it successfully, if anybody is there help me . this is my function code
when i'm try to execute it,
(comments are locked)
|
|
You could use this script: sure, i 'll just chk it.
Mar 21 '11 at 02:36 PM
pravin gate
i used this code , but didnt happened anything. is there any way in unity lik c, to check code by debugging? so we can get idea what is actully happening?
Mar 21 '11 at 02:47 PM
pravin gate
Did you attach a BoxCollider to the cubes?
Mar 21 '11 at 03:02 PM
efge
Hey , with the help of ur code , whenevr i'll click on cube , it is disappearing. its really good thing. but when i'll click on my last cube in prefab, it should have to load next level. only that thing is not working. i think we should need to chk out our count value. do u know how can i chk that how many cubes(objects) are contained in my prefab currently??. becauz until count value goes to zero it will not load next level.
Mar 22 '11 at 05:00 AM
pravin gate
Hii efge, as we r not declared count value, it takes it as -1,-2,-3.... and until our count value will not goes to zero it will not load next level. when i tried to chk by Debug.log(cubecount), why this is happening? wht should we need to do for that?
Mar 22 '11 at 12:45 PM
pravin gate
(comments are locked)
|
|
Your final if (clicked == true) should be outside the 'for' loop. BTW You can use just 'if (clicked)'
(comments are locked)
|

Do you want the player to click at the cubes, then deactivate the cube and when finished load the next level?
yes , when player will click on all cubes then and then only next level will be load
i have tried to build logic in such a way that ....
for(i=0;i<cube.length;i++)
if i'll cliked on cube it will disable that cube
if i'll not click on any cube. then break...
then i checked that if all cubes are disable ,
if true, next level will appear.