Exemplo n.º 1
0
        /// <summary>
        /// 释放无用资源
        /// </summary>
        private void Release()
        {
            Reset();

            currentNode     = null;
            packetHandler   = null;
            lockstepHandler = null;
            beginHandler    = null;
            endHandler      = null;
            runFrameCount   = 0;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 添加监听帧逻辑处理
 /// </summary>
 /// <param name="handler">Handler.</param>
 public void AddListennerLogic(RunLockStepLogic handler)
 {
     lockstepHandler = lockstepHandler == null ? handler : lockstepHandler + handler;
 }
Exemplo n.º 3
0
 /// <summary>
 /// 移除心跳事件
 /// </summary>
 /// <param name="handler">Handler.</param>
 protected void RemoveListenner(RunLockStepLogic handler)
 {
     updateHandler.Remove(handler);
     //this.updateHandler -= handler;
 }
Exemplo n.º 4
0
 /// <summary>
 /// 心跳事件
 /// </summary>
 /// <param name="handler">Handler.</param>
 protected void AddListenner(RunLockStepLogic handler)
 {
     updateHandler.Add(handler);
     //this.updateHandler = this.updateHandler == null ? handler : this.updateHandler + handler;
 }