// Use this for initialization void Start() { enemyModel.SetActive(true); enemyRagdoll.SetActive(false); weapon = FindObjectOfType <WeaponSwap>(); rb = GetComponent <Rigidbody>(); }
void BrakeWallShootM() { if (PhotonScriptor.ConnectingScript.informPlayerID() == 1) { if (WeaponSwap.InformQ() == true && Input.GetKeyDown(KeyCode.Mouse0)) { magazine--; GameObject bulletSpawn = PhotonNetwork.Instantiate("BrakeWallBullet", Mazzle.transform.position + PlayerCamera.transform.forward, Quaternion.Euler(this.transform.localEulerAngles.x + 90f, Player.localEulerAngles.y, Player.localEulerAngles.z)); Rigidbody BulletRigid = bulletSpawn.GetComponent <Rigidbody>(); BulletRigid.AddForce(this.transform.forward * bulletSpeed, ForceMode.Impulse); SoundEffects.WallBrakerShootSound.shotTrueM(); } } else { if (WeaponSwap.InformQ() == true && Input.GetKeyDown(KeyCode.Mouse0)) { magazine--; GameObject bulletSpawn = PhotonNetwork.Instantiate("BrakeWallBullet", Mazzle.transform.position + PlayerCamera.transform.forward, Quaternion.Euler(this.transform.localEulerAngles.x + 90f, Player2.localEulerAngles.y, Player2.localEulerAngles.z)); Rigidbody BulletRigid = bulletSpawn.GetComponent <Rigidbody>(); BulletRigid.AddForce(this.transform.forward * bulletSpeed, ForceMode.Impulse); SoundEffects.WallBrakerShootSound.shotTrueM(); } } }
// Start is called before the first frame update void Start() { weaponSwap = GameObject.Find("Player"); WeaponGun = weaponSwap.GetComponent <WeaponSwap>(); Knife = GameObject.Find("Knife");; star = GameObject.Find("Star");; }
// Use this for initialization void Start() { controller = FindObjectOfType <PlayerController>(); controller2 = FindObjectOfType <PlayerController2>(); swap = FindObjectOfType <WeaponSwap>(); swap2 = FindObjectOfType <WeaponSwap2>(); }
// Start is called before the first frame update void Start() { Health = 100; Defense = 3; weaponManager = this.GetComponentInChildren <WeaponSwap>(); minPower = 2; maxPower = 7; pAnim = this.GetComponent <PlayerAnimation>(); }
// Start is called before the first frame update void Start() { weaponSwap = GameObject.Find("Player"); WeaponGun = weaponSwap.GetComponent <WeaponSwap>(); enemy = GameObject.Find("Enemy"); //find player attack = GameObject.Find("PlayerMelee"); //find this attackRange = 2; //range intitally 2 attack.SetActive(false); // disappear }
void Update() { if (PN != PhotonScriptor.ConnectingScript.informPlayerID()) { return; } if (TimeManager.PreParationTime.InformPreparationState() == true) { magazine = magazineMax; if (magagineIncreased == false && magazineMax == 2 && ResetTime == true) { magazineMax = 1; magazine = magazineMax; } BrakeMode = false; magagineIncreased = false; ResetTime = false; } if (Shoot.InformReloadState() == true) { return; } if (AnimationConrollScripts.PLMoveAnimeControl.InformSmoking() == true) { return; } if (WeaponSwap.InformSwap() == true) { return; } if (TimeManager.MainPhaze.InformMainphaze() == false) { return; } else { ResetTime = true; } if (TimeManager.PreParationTime.InformPreparationState() == true) { return; } if (magazine == 0) { return; } BrakeWallShootM(); }
// Start is called before the first frame update void Start() { instance = this; meleeActive = false; handgunActive = true; handgunAmmo = 20; shotgunActive = false; shotgunAmmo = 10; machinegunActive = false; machinegunAmmo = 20; }
// Use this for initialization void Start() { hp1 = 100; hp2 = 100; p1PlayerModel.SetActive(true); p1Ragdoll.SetActive(false); p2PlayerModel.SetActive(true); p2Ragdoll.SetActive(false); weapon1 = FindObjectOfType <WeaponSwap>(); weapon2 = FindObjectOfType <WeaponSwap2>(); ammo1 = FindObjectOfType <AmmoManager>(); ammo2 = FindObjectOfType <AmmoManager2>(); grenades = FindObjectOfType <GrenadeAmmo>(); }
// Use this for initialization void Start() { weaponShootingScript = GetComponent <WeaponShooting>(); weaponSwapScript = GetComponent <WeaponSwap>(); playerSkillScript = GetComponent <PlayerSkills>(); playerControllerScript = GetComponent <PlayerController>(); playerBuildingControllerScript = GetComponent <PlayerBuildingController>(); playerStatsScript = GetComponent <PlayerStats>(); // Set Controller States defaultControllerState = new DefaultControllerState(this); buidlingControllerState = new BaseBuildingControllerState(this); currentControllerState = defaultControllerState; }
// Use this for initialization void Start() { guns = new PlayerShoot[3]; weapon1 = FindObjectOfType <WeaponSwap>(); weapon2 = FindObjectOfType <WeaponSwap2>(); ammo1 = FindObjectOfType <AmmoManager>(); ammo2 = FindObjectOfType <AmmoManager2>(); p1CurrentClip = ammo1.currentClipAmmo; p1CurrentPocket = ammo1.currentPocketAmmo; p2CurrentClip = ammo2.currentClipAmmo; p2CurrentPocket = ammo2.currentPocketAmmo; }
// Start is called before the first frame update void Start() { gun = GameObject.Find("Player"); WeaponGun = gun.GetComponent <WeaponSwap>(); }
// Start is called before the first frame update void Start() { weaponSwap = GetComponentInChildren <WeaponSwap>(); isBladeMode = false; }