- Home /
This question was
closed Apr 14, 2013 at 07:29 AM by
Fattie for the following reason:
Duplicate Question
How do I get my Player to cast two fireballs at a time
I am making a upgrade menu and one of the upgrades is that it will allow my player to cast two fire balls, how do I get that to happen? I am using JavaScript. I have do it with C# before but it didnt work when I tried it with Java. The C# Script I have is:
else if (otherObject.tag == "BOC1" && Ammo > 0 && DoubleShot == 1) { StartCoroutine(DoubleShotAct1()); }
IEnumerator DoubleShotAct()
{
Vector3 position = new Vector3(transform.position.x, transform.position.y + BulletOffset);
Instantiate(Bullet, Barrel.transform.position, Quaternion.identity);
yield return new WaitForSeconds (0.3f);
Instantiate(Bullet, Barrel.transform.position, Quaternion.identity);
Ammo --;
}
How do I convert that into Java??
Comment
it's just
yield WaitForSeconds(0.3);
1000s of questions on here about timers and yield, pls search first
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
item shop menu screen 1 Answer
Renderer on object disabled after level reload 1 Answer
Menu in C# 2 Answers