public ActivePlayer(ControlPC _pc, int _teamNo, int _refID, string _name) { playerObject = _pc; teamNumber = _teamNo; referenceID = _refID; playerName = _name; }
void Start() { pc = GetComponentInParent <ControlPC>(); nextPosition.x = pc.transform.position.x; nextPosition.z = pc.transform.position.z; nextPosition.y = head.position.y; transform.position = nextPosition; }
private void OnTriggerEnter(Collider other) { ControlPC pc = other.GetComponent <ControlPC>(); if (pc) { pc.CmdEnterKillzone(); } }
public void BeginRound() { pc = Instantiate(pcPrefab, Vector3.zero, Quaternion.identity); pc.currentLives = startingLives; livesText.text = startingLives.ToString(); wm = Instantiate(waveManagerPrefab); nextLifeAt = newLifeEvery; wm.SpawnWave(); }
// Use this for initialization void Start() { controlPC = transform.parent.gameObject.GetComponent <ControlPC>(); //Debug.Log (controlPC.backValueX); Vector3 angles = transform.eulerAngles; x = angles.y; y = angles.x; }
private bool HasPlayerBeenHit(ControlPC _pc) { foreach (ControlPC item in playersHit) { if (item == _pc) { return(true); } } return(false); }
//[Command] public void ShootPC(GameObject hitPoint, int dmg, int layer) { if (hitPoint) { ControlPC _pc = hitPoint.GetComponent <HitboxLink>().pc; if (_pc) { print("PC hit"); if (layer == 10) // if it's a headshot { _pc.TakeDamage(weaponDamage * 2); } else // it's a body shot { _pc.TakeDamage(weaponDamage); } } else { print("No PC"); } } }
private void Start() { pc = GetComponentInParent <ControlPC>(); currentAmmo = clipSize; }