byte error; //Error byte that can be checked with Unity documentation // Start is called before the first frame update void Start() { ObjectManager = FindObjectOfType <CheckMovingObjects>(); //Use this for transmission and recieving //initialise the server Clients = new List <int>(); DontDestroyOnLoad(this); Player2.NTWK.ServerOwned = false; IPHolder IP = FindObjectOfType <IPHolder>(); if (IP != null) { if (IP.IPAddress == "") { //Player1.Playing = true; Player1Proper.Player1 = true; Player2Proper.Player1 = false; Player1.NTWK.ServerOwned = true; Player2.NTWK.ServerOwned = false; ObjectManager.Hosting = true; ObjectManager.Serv = this; Init(); SpawnObject(transform.position); } else { Player2Proper.Player1 = true; Player1Proper.Player1 = false; Player2.NTWK.ServerOwned = false; } } }
void Start() { rigidBody = GetComponent <Rigidbody>(); animator = GetComponent <Animator>(); movement = GetComponent <characterMovement>(); Check = FindObjectOfType <CheckMovingObjects>(); }
//bool CollidedThisLife = false; void Start() { timer = 0; isReturning = false; isStationary = false; playerStartPos = owner.transform; rigidBody = GetComponent <Rigidbody>(); bmCollider = GetComponent <CapsuleCollider>(); throwScript = owner.GetComponent <throwBoomerang>(); Physics.IgnoreCollision(owner.GetComponent <CapsuleCollider>(), bmCollider); check = FindObjectOfType <CheckMovingObjects>(); }
void Start() { Check = FindObjectOfType <CheckMovingObjects>(); if (Check.Hosting) { ActivePlayer = Player1; } else { ActivePlayer = Player2; } }
public void Assign(int ID, GameObject SpawnedObject, CheckMovingObjects cc) { Checkmoving = cc; NetworkObjectScript tempy = new NetworkObjectScript(); switch (ID) { case 0: tempy = SpawnedObject.AddComponent <FakeObjectType>().Obj; break; } Checkmoving.NetworkedObjects.Add(tempy); }
// Start is called before the first frame update void Start() { check = FindObjectOfType <CheckMovingObjects>(); }