Ejemplo n.º 1
0
 /// <summary>
 /// Add object to physics simulation
 /// </summary>
 void OnEnable()
 {
     if (inList == false)
     {
         UCPhysics.AddPhysicsObject(this);
         inList = true;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Add to physics simulation and update bounds
        /// </summary>
        void Start() // run this and also onEnable cause sometimes on enable isnt called.
        {
            UpdateBounds(center, size);

            if (!inList)
            {
                UCPhysics.AddPhysicsObject(this);
                inList = true;
            }
        }