Ejemplo n.º 1
0
    private void Awake()
    {
        // if the singleton hasn't been initialized yet
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;//Avoid doing anything else
        }

        instance = this;
        DontDestroyOnLoad(this.gameObject);
    }
Ejemplo n.º 2
0
        public PropertyDescriptorCollection GetProperties()
        {
            // Create a new collection object PropertyDescriptorCollection
            PropertyDescriptorCollection pds = new PropertyDescriptorCollection(null);

            // Iterate the list of employees
            for (int i = 0; i < WrappedShapeIds.Count; i++)
            {
                ShapeFrameIdPair pair = ShapeDataManager.RetrieveShapeForFrame(WrappedShapeIds[i], FrameId);

                ShapePropertyDescriptor pd = new ShapePropertyDescriptor(pair.Shape, $"[{i}]");
                pds.Add(pd);
            }
            return(pds);
        }
Ejemplo n.º 3
0
 public ShapeListWrapper(List <uint> shapeIds, ShapeDataManager shapeDataManager, int frameId)
 {
     WrappedShapeIds  = shapeIds;
     ShapeDataManager = shapeDataManager;
     FrameId          = frameId;
 }
Ejemplo n.º 4
0
 public RigidBodyPropertyWrapper(RigidBody bodyToWrap, ShapeDataManager shapeDataManager, int frameId)
 {
     BodyToWrap       = bodyToWrap;
     Matrix4x4Wrapper = new Matrix4x4PropertyWrapper(BodyToWrap.WorldMatrix);
     ShapeListWrapper = new ShapeListWrapper(bodyToWrap.CollisionShapeIds, shapeDataManager, frameId);
 }