예제 #1
0
파일: BallView.cs 프로젝트: harryqk/Newbie
 void SyncMove()
 {
     if (data != null &&
         data.GetMove() &&
         data.isMe)
     {
         pass += Time.deltaTime;
         if (pass > sec)
         {
             pass = 0;
             int dir = Random.Range(1, 5);
             dir = validateDir(dir);
             byte[] action  = ByteUtil.IntToBytes2(ActionType.keyboardMove);
             byte[] content = ByteUtil.IntToBytes2(dir);
             byte[] send    = ByteUtil.BytesCombine(action, content);
             //NetMgr.getInstance().send(Protocol.Update, send);
         }
     }
 }