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); }
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> (); }
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; }
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; }
// Use this for initialization void Start () { anim = GetComponent<Animator>(); Fpc = gameObject.GetComponent<FirstPersonController> (); gat = gameObject.GetComponent<GrabAndToss> (); }