using UnityEngine;
using System.Collections;
using System.IO;
using TNet;
public class MapLoader : TNBehaviour {
int intToSave;
void Start ()
{
InvokeRepeating("CheckConnection", 0, 2);
}
void CheckConnection ()
{
if(TNManager.isInChannel)
{
CancelInvoke("CheckConnection");
if(intToSave == 0)
{
print("intToSave has the default value");
tno.Send("SaveInt", Target.AllSaved, 1);
print("intToSave is now: " + intToSave);
}
else
{
print("intToSave is: " + intToSave);
}
}
}
[RFC]
void SaveInt (int number)
{
intToSave = number;
}
}