Okay we finally get the movement to work with the other scripts and i added the power ups and power downs for the other items like the crown, the energy bar and the spikes.
these are the public floats for the player;
public float jumpForce = 600;
public float starForce = 20;
public float powerForce = 30;
public float saboForce = -20;
public float slowDown = 5;
I tagged them to the different items
if (other.tag == "powerup")
{
this.rigidbody.velocity = new Vector3(0, powerForce, 0);
score++;
StartCoroutine(blast(Booster));
Destroy(other.gameObject);
}
if (other.tag == "powerdown")
{
this.rigidbody.velocity = new Vector3(0, saboForce, 0);
score--;
Destroy(other.gameObject);
}
if (other.tag == "multipoint")
{
this.rigidbody.velocity = new Vector3(0, starForce, 0);
score+= score;
Instantiate(SparkleCrown, this.transform.position, Quaternion.identity);
Destroy(other.gameObject);
}
if (other.tag == "slowdown")
{
this.rigidbody.velocity = new Vector3(0, slowDown, 0);
score--;
Destroy(other.gameObject);
power up will be the Energy Bar
power down will be the Spikes
multipoint will be the Crown
slowdown will be the boots
I added a platform so when the player wins he could stay on top to bask on his victory!
I use the same script as the OnTriggerStay function on the top plane.
And also designing of the map.
TAKYAA EGYPT!
Thats it for now, Next stop, NEXT LEVEL!
No comments:
Post a Comment