Beispiel #1
0
        public static void TestWrite()
        {
            TestByteArrayWrite(); return;

            TestByteArray();
            return;

            MemoryStream ms = new MemoryStream();

            /*byte _b = Convert.ToByte(1);
             * ms.WriteByte(_b);*/
            byte[] _byte = Encoding.UTF8.GetBytes("helloworld");

            /*for (int i = 0; i < _byte.Length; i++)
             * {
             *  _byte[i] = Convert.ToByte(i);
             * }*/
            ms.Write(_byte, 0, _byte.Length);
            GameInput.Log("ms length : ");
            GameInput.Log("ms getBuffer: " + Encoding.UTF8.GetString(ms.GetBuffer()));
        }
Beispiel #2
0
        public override ResultType Execute(BInput _input)
        {
            if (_currentIndex >= listChilds.Count)
            {
                GameInput.DebugLog("没有找到匹配这个条件的");
                return(ResultType.Fail);
            }

            Node _node = listChilds[_currentIndex];

            if (_node.Evaluate(_input))
            {
                return(result = _node.RunNode(_input));
            }
            else
            {
                _currentIndex++;
                Execute(_input);
            }
            result = ResultType.Running;
            return(result);
        }
Beispiel #3
0
 protected virtual void Enter()
 {
     GameInput.DebugLog("node enter : " + nodeName);
     state = State.Enter;
 }
Beispiel #4
0
 public void LoadActionConfig()
 {
     GameInput.DebugLog("load action config");
 }
Beispiel #5
0
 protected virtual void Enter()
 {
     _state = GuideState.enter;
     GameInput.Log("guide node enter : " + name);
 }
Beispiel #6
0
 public override ResultType Execute(BInput _input)
 {
     GameInput.DebugLog("do action idle");
     state = State.Exit;
     return(ResultType.Success);
 }
Beispiel #7
0
 public void Dispose()
 {
     _stopWatch.Stop();
     GameInput.Log("'{0}' exec time: {1:0.000} (ms)", _tag, ((double)_stopWatch.ElapsedTicks / (double)Stopwatch.Frequency) * 1000);
 }