//public Vector3 myVector = Vector3.zero; // Start is called before the first frame update void Start() { PV = GetComponent <PhotonView>(); myCC = GetComponent <CharacterController>(); camera = GetComponent <AvatarSetup>().myCamera; avatarSetup = GetComponent <AvatarSetup>(); }
private void OnEnable() { if (AvatarSetup.AS == null) { AvatarSetup.AS = this; } }
private void Start() { pv = GetComponent <PhotonView>(); avatarSetup = GetComponent <AvatarSetup>(); healthDisplay = GameObject.Find("HealthText").GetComponent <Text>(); healthDisplay.text = avatarSetup.playerHealth.ToString(); }
private void OnCollisionEnter(Collision collision) { if (collision.collider.tag != "Arrow") { Stick(); this.transform.position = collision.contacts[0].point; GameObject anchor = new GameObject("Arrow_Anchor"); anchor.transform.position = this.transform.position; anchor.transform.rotation = this.transform.rotation; anchor.transform.parent = collision.transform; this.anchor = anchor.transform; hitSomething = true; } if (collision.collider.tag == "Avatar") { AvatarSetup pd = collision.gameObject.GetComponent <AvatarSetup>(); pd.TakeDamage(ArrowDamage); Debug.Log("KnockBack"); Rigidbody rb = collision.collider.GetComponent <Rigidbody>(); Vector3 direction = collision.transform.position - this.transform.position; direction.y = 0; rb.AddForce(direction.normalized * knockbackPower, ForceMode.Impulse); } }
// Start is called before the first frame update void Start() { PV = GetComponent <PhotonView>(); avatarSetup = GetComponent <AvatarSetup>(); healthDisplay = GameSetup.GS.healthDisplay; manaDisplay = GameSetup.GS.manaDisplay; mNavMeshAgent = GetComponent <NavMeshAgent>(); }
private bool IsLocalPlayer(Collider other, out AvatarSetup avatarSetup) { avatarSetup = other.GetComponentInParent <AvatarSetup>(); if (avatarSetup == null) { return(false); } return(avatarSetup.photonView.IsMine); }
private void Awake() { PV = GetComponent <PhotonView>(); RB = GetComponent <Rigidbody2D>(); AV = GetComponent <AvatarSetup>(); startTime = Time.time; anim = GetComponentInChildren <Animator>(); if (PV.IsMine) { GameSettings.GS.localPlayer = this; } }
private void Start() { avatarSetups = FindObjectsOfType <AvatarSetup>(); if (avatarSetups != null) { for (int i = 0; i < avatarSetups.Length; i++) { if (avatarSetups[i].GetComponent <PhotonView>().IsMine) { avatar = avatarSetups[i]; } } } }
// Start is called before the first frame update void Start() { PV = GetComponent <PhotonView>(); if (!PV.IsMine) { return; } if (PR == null) { PR = this; } avatar = GetComponent <AvatarSetup>(); avatarCombat = GetComponent <AvatarCombat>(); }
void Start() { PV = GetComponent <PhotonView>(); if (!PV.IsMine) { return; } healthDisplay = GameSetup.GS.playerHealth; healthBarDisplay = GameSetup.GS.playerHealthBar; avatarSetup = GetComponent <AvatarSetup>(); gunState = GunStateMachine.NONE; reloading = GameSetup.GS.reloading; bulletsLeft = GameSetup.GS.bulletsLeft; bullets = GameSetup.GS.bullets; }
void Start() { PV = GetComponent <PhotonView>(); avatarSetup = GetComponent <AvatarSetup>(); healthUI = GameSetup.GS.healthUI; }
private void Start() { pv = GetComponent <PhotonView>(); avs = GetComponent <AvatarSetup>(); }
// Start is called before the first frame update void Start() { PV = GetComponent <PhotonView>(); avatarSetup = GetComponent <AvatarSetup>(); }
void Start() { PV = GetComponent <PhotonView>(); Cursor.visible = false; avatarSetup = GetComponent <AvatarSetup>(); }
// Start is called before the first frame update void Start() { arrowbody = GetComponent <Rigidbody>(); PV = GetComponent <PhotonView>(); avatarSetup = GetComponent <AvatarSetup>(); }
// Use this for initialization void Start() { PV = GetComponent <PhotonView>(); avatarSetup = GetComponent <AvatarSetup>(); rayOrigin = transform; }