- Home /
Multi touch (help have issues)
i'm having some problems with this next stage that i'm on. I have been using MouseButtonDown but i can only pop one ball at a time. i have been looking up on multi touch and what they say just goes over my head multi touch 4 loop and hit test? i am having trouble understanding the code to go with it. what i need to happen, instead of one touch i need two at the same time. i want to know if i can keep the OnMOuseDown or if i need to change it up, also ready using a raycast? not a big fan of rays if you guys could help me i would really appreciate it!
CODE: THIS CODE IS PLACE ON THE BALLS THEMSELVES
#pragma strict
var tapCount : int;
var Health : int;
var bubbleEasy : boolean = false;
var bubbleMed : boolean = false;
var bubbleHard : boolean = false;
function start()
{
if (bubbleEasy == true){
Health = 1;
}
else if (bubbleMed == true){
Health = 2;
}
else if (bubbleHard == true){
Health = 3;
}
}
function Update(){
if (Health == 0){
PopBubble();
}
}
function OnMouseDown()
{
Health -= 1;
//Destroy (gameObject);
}
function OnDestroy (){
tapCount += 1;
}
function PopBubble(){
Destroy (gameObject);
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Multi-Touch help 1 Answer
How to touch specific objects? 1 Answer
Exception error 1 Answer
touch input certain screen part 1 Answer