private void OnAmmoFired(GameObject Ammo) { GameStats.ArrowFired.Invoke(); WeaponStatUpgrade.Types activeAmmoBonus = this._activeAmmoBonus; if (activeAmmoBonus != WeaponStatUpgrade.Types.BurningAmmo) { if (activeAmmoBonus == WeaponStatUpgrade.Types.PoisonnedAmmo) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this._poisonArrowPrefab); gameObject.transform.parent = Ammo.transform; gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; } } else if (this._activeFireArrowGO) { this._activeFireArrowGO.transform.parent = Ammo.transform; if (!this._activeFireArrowGO.GetComponent <destroyAfter>()) { this._activeFireArrowGO.gameObject.AddComponent <destroyAfter>().destroyTime = 15f; } this._activeFireArrowGO = null; } this.SetActiveArrowBonus((WeaponStatUpgrade.Types)(-1)); this._currentAmmo.ActiveBonus = (WeaponStatUpgrade.Types)(-1); }
private void Burn(MasterFireSpread fire) { if (this.PutOutFires) { fire.PutOut(); } }
private void SetActiveBowBonus(WeaponStatUpgrade.Types bonusType) { if (this.BowItemView.ActiveBonus == WeaponStatUpgrade.Types.BurningAmmo && this.CurrentArrowItemView.ActiveBonus == WeaponStatUpgrade.Types.BurningAmmo && bonusType != WeaponStatUpgrade.Types.BurningAmmo && this._activeFireArrowGO) { this.CurrentArrowItemView.ActiveBonus = (WeaponStatUpgrade.Types)(-1); UnityEngine.Object.Destroy(this._activeFireArrowGO.gameObject); this._activeFireArrowGO = null; } this.BowItemView.ActiveBonus = bonusType; }
private void SetActiveArrowBonus(WeaponStatUpgrade.Types bonusType) { if (this._activeAmmoBonus != bonusType) { this._activeAmmoBonus = bonusType; this.UpdateArrowRenderer(); } if (this._activeFireArrowGO) { UnityEngine.Object.Destroy(this._activeFireArrowGO.gameObject); this._activeFireArrowGO = null; } }
private void LightArrow() { GameStats.LitArrow.Invoke(); this._lightingArrow = false; this.SetActiveArrowBonus(WeaponStatUpgrade.Types.BurningAmmo); this._activeFireArrowGO = UnityEngine.Object.Instantiate <MasterFireSpread>(this._fireArrowPrefab); this._activeFireArrowGO.enabled = false; this._activeFireArrowGO.transform.parent = this._ammoAnimated.transform; this._activeFireArrowGO.transform.localPosition = Vector3.zero; this._activeFireArrowGO.transform.localRotation = Quaternion.identity; this._activeFireArrowGO.owner = LocalPlayer.Transform; LighterControler.HasLightableItem = (this.CurrentArrowItemView.ActiveBonus == WeaponStatUpgrade.Types.BurningAmmo); }
private void OnProjectileThrown(GameObject projectile) { if (this._state == BurnableItem.States.Burning) { if (this._weaponFire) { this._weaponFire.transform.parent = projectile.transform; this._weaponFire = null; } destroyAfter destroyAfter = projectile.AddComponent <destroyAfter>(); destroyAfter.destroyTime = this._fuel; Renderer component = projectile.GetComponent <Renderer>(); if (component) { component.sharedMaterial = base.GetComponent <Renderer>().sharedMaterial; } MasterFireSpread component2 = projectile.GetComponent <MasterFireSpread>(); if (component2) { component2.Fuel = this._fuel * 2f; } PickUp componentInChildren = projectile.GetComponentInChildren <PickUp>(); if (componentInChildren) { UnityEngine.Object.Destroy(componentInChildren.gameObject); } this.Burnt(); this.Dissolved(true); } else if (this._state > BurnableItem.States.Burning) { destroyAfter destroyAfter2 = projectile.AddComponent <destroyAfter>(); destroyAfter2.destroyTime = this._fuel; Renderer component3 = projectile.GetComponent <Renderer>(); if (component3) { component3.sharedMaterial = base.GetComponent <Renderer>().sharedMaterial; } } }
public void doBreakReal() { if (!this._broken) { UnityEngine.Object.Instantiate <GameObject>(this.soundGo, base.transform.position, base.transform.rotation); this._broken = true; base.gameObject.GetComponentInParent <Rigidbody>().isKinematic = true; this.Bottle.SetActive(false); if (this.setShortFire) { MasterFireSpread component = this.BottleBroken.GetComponent <MasterFireSpread>(); if (component) { component.useShortFire = true; } } this.BottleBroken.SetActive(true); if (!BoltNetwork.isRunning || base.entity.isOwner) { this.StartCleanUp(); } } }
private void LightArrow() { GameStats.LitArrow.Invoke(); this._lightingArrow = false; this.SetActiveArrowBonus(WeaponStatUpgrade.Types.BurningAmmo); this._activeFireArrowGO = UnityEngine.Object.Instantiate<MasterFireSpread>(this._fireArrowPrefab); this._activeFireArrowGO.enabled = false; this._activeFireArrowGO.transform.parent = this._ammoAnimated.transform; this._activeFireArrowGO.transform.localPosition = Vector3.zero; this._activeFireArrowGO.transform.localRotation = Quaternion.identity; this._activeFireArrowGO.owner = LocalPlayer.Transform; LighterControler.HasLightableItem = (this.CurrentArrowItemView.ActiveBonus == WeaponStatUpgrade.Types.BurningAmmo); }
private void SetActiveBowBonus(WeaponStatUpgrade.Types bonusType) { if (this.BowItemView.ActiveBonus == WeaponStatUpgrade.Types.BurningAmmo && this.CurrentArrowItemView.ActiveBonus == WeaponStatUpgrade.Types.BurningAmmo && bonusType != WeaponStatUpgrade.Types.BurningAmmo && this._activeFireArrowGO) { this.CurrentArrowItemView.ActiveBonus = (WeaponStatUpgrade.Types)(-1); UnityEngine.Object.Destroy(this._activeFireArrowGO.gameObject); this._activeFireArrowGO = null; } this.BowItemView.ActiveBonus = bonusType; }
private void SetActiveArrowBonus(WeaponStatUpgrade.Types bonusType) { if (this._activeAmmoBonus != bonusType) { this._activeAmmoBonus = bonusType; this.UpdateArrowRenderer(); } if (this._activeFireArrowGO) { UnityEngine.Object.Destroy(this._activeFireArrowGO.gameObject); this._activeFireArrowGO = null; } }
private void OnAmmoFired(GameObject Ammo) { GameStats.ArrowFired.Invoke(); WeaponStatUpgrade.Types activeAmmoBonus = this._activeAmmoBonus; if (activeAmmoBonus != WeaponStatUpgrade.Types.BurningAmmo) { if (activeAmmoBonus == WeaponStatUpgrade.Types.PoisonnedAmmo) { GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(this._poisonArrowPrefab); gameObject.transform.parent = Ammo.transform; gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; } } else if (this._activeFireArrowGO) { this._activeFireArrowGO.transform.parent = Ammo.transform; if (!this._activeFireArrowGO.GetComponent<destroyAfter>()) { this._activeFireArrowGO.gameObject.AddComponent<destroyAfter>().destroyTime = 15f; } this._activeFireArrowGO = null; } this.SetActiveArrowBonus((WeaponStatUpgrade.Types)(-1)); this._currentAmmo.ActiveBonus = (WeaponStatUpgrade.Types)(-1); }