void OnConnectedToServer() { // SpawnCubes(); //Debug.Log("Connected to server"); StartCoroutine(GetObjects()); serverView.RPCEx("RespawnStuart", RPCMode.Server); }
void OnGUI() { if (GUILayout.Button("Call Print")) { otherView.RPCEx("PrintThis", RPCMode.All, "Hello World", "Not lol"); } }
public void SetTarget(Vector3 clickedPosition) { targetObj.transform.position = clickedPosition; Vector3 targetVector = clickedPosition; serverView.RPCEx("SetStuartTarget", RPCMode.Server, targetVector.x, targetVector.y, targetVector.z); }
void Update() { if (isAlive) { if (isInEmc) { if (countDownBeforeDie > delayBeforeHide) { if (!isSafe) { //stuart est mort serverView.RPCEx("StuartDead", RPCMode.All); isAlive = false; Debug.Log("You'r dead, bitch"); } else { //reset des variables countDownBeforeDie = 0f; isInEmc = false; isSafe = true; Debug.Log("Definitly safe"); } } //décrémente le temps countDownBeforeDie += Time.deltaTime; } GetCubesForce(); if (!stopStuart) { WheelAngle(); } else { StopStuart(); } } else { stopStuart = true; StopStuart(); } //debug stuff if (Input.GetMouseButtonUp(2)) { targetObj.transform.position = this.transform.position; } }
public void CreateNewWave() { switch (interactiveMode) { case InteractiveMode.Repulsive: serverView.RPCEx("CreateWave", RPCMode.All, cubeId, (int)interactiveMode); Debug.Log("a"); break; case InteractiveMode.Attractive: serverView.RPCEx("CreateWave", RPCMode.All, cubeId, (int)interactiveMode); Debug.Log("b"); break; case InteractiveMode.Emc: Debug.Log("émojqhsfmoqshfg"); serverView.RPCEx("CreateWave", RPCMode.All, cubeId, (int)interactiveMode); break; } }