Beispiel #1
0
 public void Checkpointer1()
 {
     fo1.DirectSetSpeed(stop);
     fo1.SetGravityBaseForce(gravity);
     Player.transform.position = new Vector3(checkpoint.position.x, checkpoint.position.y + heightrespawn,
                                             checkpoint.position.z);
 }
Beispiel #2
0
    private void OnTriggerEnter(Collider other)
    {
        ForceObject forceObject = other.GetComponent <ForceObject>();

        if (forceObject == null)
        {
            return;
        }

        forceObject.SetGravityBaseForce(newGravity);
    }
Beispiel #3
0
    private void OnTriggerExit(Collider other)
    {
        if (!disableOnExit)
        {
            return;
        }

        ForceObject forceObject = other.GetComponent <ForceObject>();

        if (forceObject == null)
        {
            return;
        }

        forceObject.SetGravityBaseForce(GameProperties.Singleton.BaseGravity);
    }
    void Start()
    {
        ForceObject fo = GetComponent <ForceObject>();

        fo.SetGravityBaseForce(newGravity);
    }