Ejemplo n.º 1
0
    private void handleCollision()
    {
        //Gives the waypoint to the waypoint camera
        variables.waypointCam.SetWaypoint(this, false);
        shaking = true;

        Color color = render.material.color;

        color.a        -= .25f;
        shakeMagnitude += new Vector2(1, 1);
        shakeDuration  += 1;
        shakePosition.SetShakeParameters(shakeFrequency, shakeDuration);
        shakePosition.SetShakeMagnitude(shakeMagnitude, origin);
        if (color.a <= 0)
        {
            handleReposition();
            color.a = 1;
        }
        render.material.color = color;
    }
Ejemplo n.º 2
0
 public void Shake()
 {
     shakePosition.SetShakeParameters(shakeFrequency, shakeDuration);
     shakePosition.SetShakeMagnitude(shakeMagnitude, new Vector3(0, 0, 0));
 }