This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - xzkmxd
Pages: [1]
1
« on: July 02, 2016, 07:54:39 AM »
How to set the Tnet connection timeout.
2
« on: May 31, 2016, 06:55:30 AM »
Use Net long will this appear BUG .. This should be a very serious BUG.
3
« on: May 28, 2016, 01:18:12 PM »
void FixedUpdate()
{
transform.position = Vector3.Lerp(StartPos, EndPos, 50 * Time.fixedDeltaTime);
}
void Start()
{
if (tno.isMine)
{
GetComponent<MeshRenderer>().material.color = Color.red;
}
else
{
Destroy(transform.Find("Camera").gameObject);
}
StartPos = transform.position;
EndPos = transform.position;
//Assets.handling.Game.ClinetPacketCreator.PlayerMove(TNet.TNManager.client, TNet.TNManager.client.playerID, transform.position);
StartCoroutine(PeriodicSync());
}
void Update()
{
Debug.Log("isMune:" + isMune);
if (tno.isMine)
{
StartPos = transform.position;
EndPos
= StartPos
+ new Vector3
(0,
0,
5 * Time
.deltaTime); //transform.position += new Vector3(0, 0, 5 * Time.deltaTime);
}
}
#endregion
[TNet.RFC(25)]
public void UpdateMove(Vector3 start,Vector3 end)
{
StartPos = start;
EndPos = end;
}
public float updatesPerSecond = 100f;
IEnumerator PeriodicSync()
{
for (; ; )
{
if (updatesPerSecond > 0f)
{
//if (mList.size != 0 && (!onlyOwnerCanSync || tno.isMine) && Cache()) Sync();
//Assets.handling.Game.ClinetPacketCreator.PlayerMove(TNet.TNManager.client, TNet.TNManager.client.playerID, transform.position);
tno.Send(25, TNet.Target.OthersSaved, StartPos, EndPos);
yield return new WaitForSeconds
(1f
/ updatesPerSecond
); }
else yield return new WaitForSeconds
(0
.1f
); }
}
4
« on: April 22, 2016, 09:11:56 AM »
The object is not controlled by the player, but it will always move. There will be a shake of the situation. Or I will send a project to you to see.
5
« on: April 20, 2016, 10:30:27 PM »
Tnet directly continues to move, sometimes shake the situation occurs, why mobile is transform.Translate (Vector3.forward * 5 * Time.deltaTime);
Pages: [1]