Пример #1
0
 /// <summary>
 /// Returns the block's handler.
 /// </summary>
 /// <param name="blockId">Block identifier string.</param>
 /// <returns>Block object.</returns>
 public static Lench.Scripter.Blocks.BlockHandler GetBlock(string blockId)
 {
     try
     {
         return(BlockHandlerController.GetBlock(new Guid(blockId)));
     }
     catch (FormatException)
     {
         return(BlockHandlerController.GetBlock(blockId));
     }
 }
Пример #2
0
        internal TrackedCollider(Collider hitCollider, Vector3 hitPoint)
        {
            c            = hitCollider;
            offset       = c.transform.InverseTransformPoint(hitPoint);
            lastPosition = Position;
            var bb = c.transform.parent.gameObject.GetComponent <BlockBehaviour>();

            if (bb != null)
            {
                block = BlockHandlerController.GetBlock(bb);
            }
        }