Ejemplo n.º 1
0
    private void OnCollisionEnter(Collision collision)
    {
        IMoveable <Vector3> thing = collision.gameObject.GetComponent <IMoveable <Vector3> >();

        if (thing != null)
        {
            thing.MoveBy(MyDisp * ForceMultiplier);
        }
        Debug.Log("Boing");
    }
Ejemplo n.º 2
0
    private void OnCollisionStay(Collision collision)
    {
        //IMoveable<Vector3> thing = collision as IMoveable<Vector3>;

        IMoveable <Vector3> thing = collision.gameObject.GetComponent <IMoveable <Vector3> >();

        if (thing != null)
        {
            thing.MoveBy(MyDisp * ForceMultiplier);
        }
        Debug.Log("Still Here");
    }