public void SetTarget(EnemyInfoMessage t) { targetPosition.x = t.x; targetPosition.y = t.y; targetPosition.z = t.z; targetRotation = new Vector3(t.angleX, t.angleY, t.angleZ); }
protected override void GetNetworkMsgCallBack(params object[] obj_arr) { NetworkMessage message = (NetworkMessage)obj_arr[0]; if (message.type == 70) { EnemyInfoMessage info = EnemyInfoMessage.GetMessage(message.message); net.SetTarget(info); } else { if (message.type == 72) { if (!message.ip.Equals(NetworkTools.GetLocalIP())) { AddMessage(message); } } else { AddMessage(message); } } }