Esempio 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");
    }
Esempio 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");
    }