Esempio n. 1
0
	public override void OnStartLocalPlayer ()
	{
		cam.enabled = true;
		gat = gameObject.GetComponent<GrabAndToss> ();
		gat.enabled = true;
		audioLis.enabled = true;
		foreach (GameObject go in bodyParts) {
							go.layer = 9;
						}
		//Enable network animations
		GetComponent<NetworkAnimator> ().SetParameterAutoSend (0, true);
		GetComponent<NetworkAnimator> ().SetParameterAutoSend (1, true);
		GetComponent<NetworkAnimator> ().SetParameterAutoSend (2, true);
		GetComponent<NetworkAnimator> ().SetParameterAutoSend (3, true);
		GetComponent<NetworkAnimator> ().SetParameterAutoSend (4, true);
	}
Esempio n. 2
0
	private DodgeBallBehaviour ballInfo; //Script on the ball colliding with the player;

	// Use this for initialization
	void Start () {
		gat = gameObject.GetComponent<GrabAndToss> ();
		NLH = GameObject.Find("LobbyManager").GetComponent<NetworkLobbyHook>();
		netInfo = gameObject.GetComponent<NetworkCharacterInfo> ();
	}
Esempio n. 3
0
	public void Rpc_GetPickedUp (GameObject go){
		coll.enabled = false;
		rb.detectCollisions = false;
		rb.isKinematic = true;
		currentPlayer = go;
		gat = currentPlayer.GetComponent<GrabAndToss> ();
		pickedUp = true;
        ParticlesAwareness.SetActive(false);
		rb.velocity = Vector3.zero;
		rb.angularVelocity = Vector3.zero;

	
	}
Esempio n. 4
0
	public void Rpc_Shoot (float force){
		bounces = 10;
		rb.velocity = Vector3.zero;
		rb.angularVelocity = Vector3.zero;
		rb.isKinematic = false;
		thrownByTeam = currentPlayer.GetComponent<NetworkCharacterInfo> ().teamNumber;
		coll.enabled = true;
		rb.detectCollisions = true;
		rb.AddForce(gat.c_Head.transform.forward * force);
		gat = null;
        ParticlesAwareness.SetActive(true);
        pickedUp = false;
	}
Esempio n. 5
0
	// Use this for initialization
	void Start () {
		anim = GetComponent<Animator>();
		Fpc = gameObject.GetComponent<FirstPersonController> ();
		gat = gameObject.GetComponent<GrabAndToss> ();
	
	}