Exemplo n.º 1
0
 void OnEnable()
 {
     Network.natFacilitatorIP = "jessewatson.org";
     MasterServer.ipAddress = "jessewatson.org";
     Application.runInBackground = true;
     instance = this;
     SpawnPoints = new List<Vector2>();
     SpawnedObjectsNew = new List<OmniObject>();
     openSlots = new List<int>();
     eventManager = GameObject.FindGameObjectWithTag("GameController").GetComponent<OmniEvents>();
     networkManager = GetComponent<OmniNetwork>();
     localManager = GetComponent<OmniLocal>();
     physTest = GetComponent<Rigidbody2D>();
     netView = networkManager.networkView;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     terrain = GetComponent<OmniTerrain>();
     world = GetComponent<OmniWorld>();
     snapshot = new MemoryStream();
     snapshot_reader = new BinaryReader(snapshot);
     snapshot_writer = new BinaryWriter(snapshot);
     cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     activeChunks = new List<TerrainChunk>();
     loadedChunks = new List<TerrainChunk>();
     terrainUpdates = new List<tUpdate>();
     toValidate = new List<tUpdate>();
     toRemove = new List<tUpdate>();
     OmniTerrain.chunks = new Dictionary<int, TerrainChunk>();
     OmniTerrain.biomes = new Dictionary<int, int>();
     world = GetComponent<OmniWorld>();
     camera = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<Camera> ();
 }