Example #1
0
        public override bool AddString(string value)
        {
            TData data = new TData(VARIANT_TYPE.VTYPE_STRING);
            data.Set(value);

            return AddDataObject(ref data);
        }
Example #2
0
        public override bool AddFloat(double value)
        {
            TData data = new TData(VARIANT_TYPE.VTYPE_FLOAT);
            data.Set(value);

			return AddDataObject(ref data);
        }
Example #3
0
        public override bool AddInt(Int64 value)
        {
            TData data = new TData(VARIANT_TYPE.VTYPE_INT);
            data.Set(value);

			return AddDataObject(ref data);
        }
Example #4
0
        public override bool AddDouble(double value)
        {
            TData data = new TData(VARIANT_TYPE.VTYPE_DOUBLE);
            data.Set(value);

            return AddDataObject(ref data);
        }
Example #5
0
 public static bool CheckTreeDistance( TData terrainData,  Vector3 position, int prototypeIndex, float spacing)
 {
     foreach (MyTreeInstance tree in terrainData.treeInstances) {
         if (tree.prototypeIndex == prototypeIndex) {
             if ((tree.position - position).magnitude < spacing) {
                 return false;
             }
         }
     }
     return true;
 }
Example #6
0
        private string InternalSpawn(string pid, BaseHandler handler)
        {
            handler.PID = pid;
            handler.dispatcher = this;

            var td = new TData { handler = handler };
            td.thread = new Thread(td.RunMsg);

            //var f1 = DateTime.Now;
            lock (handlers)
            {
                handlers.Add(td);
            }
            //var f2 = DateTime.Now.Subtract(f1);
            //Console.WriteLine(f2.TotalMilliseconds);

            td.thread.Start();

            Send(handler.PID, new SigOnly("create"));
            return pid;
        }
Example #7
0
        public override bool AddVector2(NFVector2 value)
        {
            TData data = new TData(VARIANT_TYPE.VTYPE_VECTOR2);
            data.Set(value);

            return AddDataObject(ref data);
        }
Example #8
0
        public override bool AddObject(NFGUID value)
        {
            TData data = new TData(VARIANT_TYPE.VTYPE_OBJECT);
            data.Set(value);

			return AddDataObject(ref data);
        }
Example #9
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="data"></param>
		/// <returns></returns>
        protected bool AddDataObject(ref TData data)
        {
            int nCount = mValueObject.Count;
            mValueObject.Add(nCount, data);

            return true;
        }
Example #10
0
 public TData(TData x)
 {
     nType = x.nType;
     mData = x.mData;
 }