Exemplo n.º 1
0
        public static Vector3 StrToVec3(string str, char separator)
        {
            SysUtil.Assert(str != null, "null str to vector3");

            string[] vals = str.Split(separator);
            SysUtil.Assert(vals.Length == 3, "bad format str \"" + str + "\" to vector3");

            Vector3 vec;

            vec.x = Convert.ToSingle(vals[0]);
            vec.y = Convert.ToSingle(vals[1]);
            vec.z = Convert.ToSingle(vals[2]);

            return(vec);
        }
Exemplo n.º 2
0
 public void Start()
 {
     localSysTime  = SysUtil.TickToMilliSec(System.DateTime.Now.Ticks);
     frameTime     = localSysTime;
     lastFrameTime = frameTime - 30;
 }
Exemplo n.º 3
0
 private void CheckOutOfBound(int len)
 {
     SysUtil.Assert(pos + len <= buffer.Length, "stream read out of bound");
 }