コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: WaterClean.cs プロジェクト: DevZhav/The-Forest
 private void Burn(MasterFireSpread fire)
 {
     if (this.PutOutFires)
     {
         fire.PutOut();
     }
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
     }
 }
コード例 #5
0
 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);
 }
コード例 #6
0
ファイル: BurnableItem.cs プロジェクト: DevZhav/The-Forest
 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;
         }
     }
 }
コード例 #7
0
ファイル: Molotov.cs プロジェクト: K07H/The-Forest
 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();
         }
     }
 }
コード例 #8
0
ファイル: BowController.cs プロジェクト: GameDiffs/TheForest
 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);
 }
コード例 #9
0
ファイル: BowController.cs プロジェクト: GameDiffs/TheForest
 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;
 }
コード例 #10
0
ファイル: BowController.cs プロジェクト: GameDiffs/TheForest
 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;
     }
 }
コード例 #11
0
ファイル: BowController.cs プロジェクト: GameDiffs/TheForest
 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);
 }