Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (unit.Entity.ID == "0751142d-5f06-40c1-944d-20e8fb22df41" && handType == HoldingHandler.HandType.Right)
- {
- weapon.GetComponentInChildren<Weapon>().GetComponentInChildren<Rigidbody>().detectCollisions = false;
- }
- if (unit.Entity.ID == "c0fcecb7-63e2-430c-b361-fa7cd3d89945")
- {
- weapon.GetComponentInChildren<Weapon>().maxRange *= 5f;
- }
- UMH.comment = "________________________________________________________________________________";
- UMH.comment = "This is where all units individually start";
- UMH.comment = "________________________________________________________________________________";
- UMH.comment = " ";
- UMH.comment = " ";
- UMH.comment = " ";
- UMH.comment = " ";
- UMH.comment = "________________________________________________________________________________";
- UMH.comment = "Melee";
- UMH.comment = "________________________________________________________________________________";
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren = weapon.GetComponentsInChildren<Renderer>();
- for (int i = 0; i < componentsInChildren.Length; i++)
- {
- componentsInChildren[i].material.color = new Color(1f, 1f, 1f);
- for (int j = 0; j < componentsInChildren[i].materials.Length; j++)
- {
- Color color;
- switch (j)
- {
- case 0:
- color = new Color(1f, 1f, 1f);
- break;
- case 1:
- color = new Color(1f, 0f, 0f);
- break;
- case 2:
- color = new Color(0f, 1f, 0f);
- break;
- default:
- color = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren[i].materials[j].color = color;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren2 = weapon.GetComponentsInChildren<Renderer>();
- for (int k = 0; k < componentsInChildren2.Length; k++)
- {
- componentsInChildren2[k].material.color = new Color(1f, 1f, 1f);
- for (int l = 0; l < componentsInChildren2[k].materials.Length; l++)
- {
- Color color2;
- switch (l)
- {
- case 0:
- color2 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color2 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color2 = new Color(0f, 1f, 0f);
- break;
- default:
- color2 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren2[k].materials[l].color = color2;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren3 = weapon.GetComponentsInChildren<Renderer>();
- for (int m = 0; m < componentsInChildren3.Length; m++)
- {
- componentsInChildren3[m].material.color = new Color(1f, 1f, 1f);
- for (int n = 0; n < componentsInChildren3[m].materials.Length; n++)
- {
- Color color3;
- switch (n)
- {
- case 0:
- color3 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color3 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color3 = new Color(0f, 1f, 0f);
- break;
- default:
- color3 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren3[m].materials[n].color = color3;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren4 = weapon.GetComponentsInChildren<Renderer>();
- for (int i2 = 0; i2 < componentsInChildren4.Length; i2++)
- {
- componentsInChildren4[i2].material.color = new Color(1f, 1f, 1f);
- for (int j2 = 0; j2 < componentsInChildren4[i2].materials.Length; j2++)
- {
- Color color4;
- switch (j2)
- {
- case 0:
- color4 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color4 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color4 = new Color(0f, 1f, 0f);
- break;
- default:
- color4 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren4[i2].materials[j2].color = color4;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren5 = weapon.GetComponentsInChildren<Renderer>();
- for (int i3 = 0; i3 < componentsInChildren5.Length; i3++)
- {
- componentsInChildren5[i3].material.color = new Color(1f, 1f, 1f);
- for (int j3 = 0; j3 < componentsInChildren5[i3].materials.Length; j3++)
- {
- Color color5;
- switch (j3)
- {
- case 0:
- color5 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color5 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color5 = new Color(0f, 1f, 0f);
- break;
- default:
- color5 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren5[i3].materials[j3].color = color5;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren6 = weapon.GetComponentsInChildren<Renderer>();
- for (int i4 = 0; i4 < componentsInChildren6.Length; i4++)
- {
- componentsInChildren6[i4].material.color = new Color(1f, 1f, 1f);
- for (int j4 = 0; j4 < componentsInChildren6[i4].materials.Length; j4++)
- {
- Color color6;
- switch (j4)
- {
- case 0:
- color6 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color6 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color6 = new Color(0f, 1f, 0f);
- break;
- default:
- color6 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren6[i4].materials[j4].color = color6;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren7 = weapon.GetComponentsInChildren<Renderer>();
- for (int i5 = 0; i5 < componentsInChildren7.Length; i5++)
- {
- componentsInChildren7[i5].material.color = new Color(1f, 1f, 1f);
- for (int j5 = 0; j5 < componentsInChildren7[i5].materials.Length; j5++)
- {
- Color color7;
- switch (j5)
- {
- case 0:
- color7 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color7 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color7 = new Color(0f, 1f, 0f);
- break;
- default:
- color7 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren7[i5].materials[j5].color = color7;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren8 = weapon.GetComponentsInChildren<Renderer>();
- for (int i6 = 0; i6 < componentsInChildren8.Length; i6++)
- {
- componentsInChildren8[i6].material.color = new Color(1f, 1f, 1f);
- for (int j6 = 0; j6 < componentsInChildren8[i6].materials.Length; j6++)
- {
- Color color8;
- switch (j6)
- {
- case 0:
- color8 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color8 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color8 = new Color(0f, 1f, 0f);
- break;
- default:
- color8 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren8[i6].materials[j6].color = color8;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren9 = weapon.GetComponentsInChildren<Renderer>();
- for (int i7 = 0; i7 < componentsInChildren9.Length; i7++)
- {
- componentsInChildren9[i7].material.color = new Color(1f, 1f, 1f);
- for (int j7 = 0; j7 < componentsInChildren9[i7].materials.Length; j7++)
- {
- Color color9;
- switch (j7)
- {
- case 0:
- color9 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color9 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color9 = new Color(0f, 1f, 0f);
- break;
- default:
- color9 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren9[i7].materials[j7].color = color9;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren10 = weapon.GetComponentsInChildren<Renderer>();
- for (int i8 = 0; i8 < componentsInChildren10.Length; i8++)
- {
- componentsInChildren10[i8].material.color = new Color(1f, 1f, 1f);
- for (int j8 = 0; j8 < componentsInChildren10[i8].materials.Length; j8++)
- {
- Color color10;
- switch (j8)
- {
- case 0:
- color10 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color10 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color10 = new Color(0f, 1f, 0f);
- break;
- default:
- color10 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren10[i8].materials[j8].color = color10;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren11 = weapon.GetComponentsInChildren<Renderer>();
- for (int i9 = 0; i9 < componentsInChildren11.Length; i9++)
- {
- componentsInChildren11[i9].material.color = new Color(1f, 1f, 1f);
- for (int j9 = 0; j9 < componentsInChildren11[i9].materials.Length; j9++)
- {
- Color color11;
- switch (j9)
- {
- case 0:
- color11 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color11 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color11 = new Color(0f, 1f, 0f);
- break;
- default:
- color11 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren11[i9].materials[j9].color = color11;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren12 = weapon.GetComponentsInChildren<Renderer>();
- for (int i10 = 0; i10 < componentsInChildren12.Length; i10++)
- {
- componentsInChildren12[i10].material.color = new Color(1f, 1f, 1f);
- for (int j10 = 0; j10 < componentsInChildren12[i10].materials.Length; j10++)
- {
- Color color12;
- switch (j10)
- {
- case 0:
- color12 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color12 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color12 = new Color(0f, 1f, 0f);
- break;
- default:
- color12 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren12[i10].materials[j10].color = color12;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren13 = weapon.GetComponentsInChildren<Renderer>();
- for (int i11 = 0; i11 < componentsInChildren13.Length; i11++)
- {
- componentsInChildren13[i11].material.color = new Color(1f, 1f, 1f);
- for (int j11 = 0; j11 < componentsInChildren13[i11].materials.Length; j11++)
- {
- Color color13;
- switch (j11)
- {
- case 0:
- color13 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color13 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color13 = new Color(0f, 1f, 0f);
- break;
- default:
- color13 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren13[i11].materials[j11].color = color13;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren14 = weapon.GetComponentsInChildren<Renderer>();
- for (int i12 = 0; i12 < componentsInChildren14.Length; i12++)
- {
- componentsInChildren14[i12].material.color = new Color(1f, 1f, 1f);
- for (int j12 = 0; j12 < componentsInChildren14[i12].materials.Length; j12++)
- {
- Color color14;
- switch (j12)
- {
- case 0:
- color14 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color14 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color14 = new Color(0f, 1f, 0f);
- break;
- default:
- color14 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren14[i12].materials[j12].color = color14;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren15 = weapon.GetComponentsInChildren<Renderer>();
- for (int i13 = 0; i13 < componentsInChildren15.Length; i13++)
- {
- componentsInChildren15[i13].material.color = new Color(1f, 1f, 1f);
- for (int j13 = 0; j13 < componentsInChildren15[i13].materials.Length; j13++)
- {
- Color color15;
- switch (j13)
- {
- case 0:
- color15 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color15 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color15 = new Color(0f, 1f, 0f);
- break;
- default:
- color15 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren15[i13].materials[j13].color = color15;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren16 = weapon.GetComponentsInChildren<Renderer>();
- for (int i14 = 0; i14 < componentsInChildren16.Length; i14++)
- {
- componentsInChildren16[i14].material.color = new Color(1f, 1f, 1f);
- for (int j14 = 0; j14 < componentsInChildren16[i14].materials.Length; j14++)
- {
- Color color16;
- switch (j14)
- {
- case 0:
- color16 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color16 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color16 = new Color(0f, 1f, 0f);
- break;
- default:
- color16 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren16[i14].materials[j14].color = color16;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren17 = weapon.GetComponentsInChildren<Renderer>();
- for (int i15 = 0; i15 < componentsInChildren17.Length; i15++)
- {
- componentsInChildren17[i15].material.color = new Color(1f, 1f, 1f);
- for (int j15 = 0; j15 < componentsInChildren17[i15].materials.Length; j15++)
- {
- Color color17;
- switch (j15)
- {
- case 0:
- color17 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color17 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color17 = new Color(0f, 1f, 0f);
- break;
- default:
- color17 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren17[i15].materials[j15].color = color17;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren18 = weapon.GetComponentsInChildren<Renderer>();
- for (int i16 = 0; i16 < componentsInChildren18.Length; i16++)
- {
- componentsInChildren18[i16].material.color = new Color(1f, 1f, 1f);
- for (int j16 = 0; j16 < componentsInChildren18[i16].materials.Length; j16++)
- {
- Color color18;
- switch (j16)
- {
- case 0:
- color18 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color18 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color18 = new Color(0f, 1f, 0f);
- break;
- default:
- color18 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren18[i16].materials[j16].color = color18;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren19 = weapon.GetComponentsInChildren<Renderer>();
- for (int i17 = 0; i17 < componentsInChildren19.Length; i17++)
- {
- componentsInChildren19[i17].material.color = new Color(1f, 1f, 1f);
- for (int j17 = 0; j17 < componentsInChildren19[i17].materials.Length; j17++)
- {
- Color color19;
- switch (j17)
- {
- case 0:
- color19 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color19 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color19 = new Color(0f, 1f, 0f);
- break;
- default:
- color19 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren19[i17].materials[j17].color = color19;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren20 = weapon.GetComponentsInChildren<Renderer>();
- for (int i18 = 0; i18 < componentsInChildren20.Length; i18++)
- {
- componentsInChildren20[i18].material.color = new Color(1f, 1f, 1f);
- for (int j18 = 0; j18 < componentsInChildren20[i18].materials.Length; j18++)
- {
- Color color20;
- switch (j18)
- {
- case 0:
- color20 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color20 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color20 = new Color(0f, 1f, 0f);
- break;
- default:
- color20 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren20[i18].materials[j18].color = color20;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren21 = weapon.GetComponentsInChildren<Renderer>();
- for (int i19 = 0; i19 < componentsInChildren21.Length; i19++)
- {
- componentsInChildren21[i19].material.color = new Color(1f, 1f, 1f);
- for (int j19 = 0; j19 < componentsInChildren21[i19].materials.Length; j19++)
- {
- Color color21;
- switch (j19)
- {
- case 0:
- color21 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color21 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color21 = new Color(0f, 1f, 0f);
- break;
- default:
- color21 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren21[i19].materials[j19].color = color21;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren22 = weapon.GetComponentsInChildren<Renderer>();
- for (int i20 = 0; i20 < componentsInChildren22.Length; i20++)
- {
- componentsInChildren22[i20].material.color = new Color(1f, 1f, 1f);
- for (int j20 = 0; j20 < componentsInChildren22[i20].materials.Length; j20++)
- {
- Color color22;
- switch (j20)
- {
- case 0:
- color22 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color22 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color22 = new Color(0f, 1f, 0f);
- break;
- default:
- color22 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren22[i20].materials[j20].color = color22;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren23 = weapon.GetComponentsInChildren<Renderer>();
- for (int i21 = 0; i21 < componentsInChildren23.Length; i21++)
- {
- componentsInChildren23[i21].material.color = new Color(1f, 1f, 1f);
- for (int j21 = 0; j21 < componentsInChildren23[i21].materials.Length; j21++)
- {
- Color color23;
- switch (j21)
- {
- case 0:
- color23 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color23 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color23 = new Color(0f, 1f, 0f);
- break;
- default:
- color23 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren23[i21].materials[j21].color = color23;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren24 = weapon.GetComponentsInChildren<Renderer>();
- for (int i22 = 0; i22 < componentsInChildren24.Length; i22++)
- {
- componentsInChildren24[i22].material.color = new Color(1f, 1f, 1f);
- for (int j22 = 0; j22 < componentsInChildren24[i22].materials.Length; j22++)
- {
- Color color24;
- switch (j22)
- {
- case 0:
- color24 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color24 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color24 = new Color(0f, 1f, 0f);
- break;
- default:
- color24 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren24[i22].materials[j22].color = color24;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren25 = weapon.GetComponentsInChildren<Renderer>();
- for (int i23 = 0; i23 < componentsInChildren25.Length; i23++)
- {
- componentsInChildren25[i23].material.color = new Color(1f, 1f, 1f);
- for (int j23 = 0; j23 < componentsInChildren25[i23].materials.Length; j23++)
- {
- Color color25;
- switch (j23)
- {
- case 0:
- color25 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color25 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color25 = new Color(0f, 1f, 0f);
- break;
- default:
- color25 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren25[i23].materials[j23].color = color25;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren26 = weapon.GetComponentsInChildren<Renderer>();
- for (int i24 = 0; i24 < componentsInChildren26.Length; i24++)
- {
- componentsInChildren26[i24].material.color = new Color(1f, 1f, 1f);
- for (int j24 = 0; j24 < componentsInChildren26[i24].materials.Length; j24++)
- {
- Color color26;
- switch (j24)
- {
- case 0:
- color26 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color26 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color26 = new Color(0f, 1f, 0f);
- break;
- default:
- color26 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren26[i24].materials[j24].color = color26;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren27 = weapon.GetComponentsInChildren<Renderer>();
- for (int i25 = 0; i25 < componentsInChildren27.Length; i25++)
- {
- componentsInChildren27[i25].material.color = new Color(1f, 1f, 1f);
- for (int j25 = 0; j25 < componentsInChildren27[i25].materials.Length; j25++)
- {
- Color color27;
- switch (j25)
- {
- case 0:
- color27 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color27 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color27 = new Color(0f, 1f, 0f);
- break;
- default:
- color27 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren27[i25].materials[j25].color = color27;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren28 = weapon.GetComponentsInChildren<Renderer>();
- for (int i26 = 0; i26 < componentsInChildren28.Length; i26++)
- {
- componentsInChildren28[i26].material.color = new Color(1f, 1f, 1f);
- for (int j26 = 0; j26 < componentsInChildren28[i26].materials.Length; j26++)
- {
- Color color28;
- switch (j26)
- {
- case 0:
- color28 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color28 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color28 = new Color(0f, 1f, 0f);
- break;
- default:
- color28 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren28[i26].materials[j26].color = color28;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren29 = weapon.GetComponentsInChildren<Renderer>();
- for (int i27 = 0; i27 < componentsInChildren29.Length; i27++)
- {
- componentsInChildren29[i27].material.color = new Color(1f, 1f, 1f);
- for (int j27 = 0; j27 < componentsInChildren29[i27].materials.Length; j27++)
- {
- Color color29;
- switch (j27)
- {
- case 0:
- color29 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color29 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color29 = new Color(0f, 1f, 0f);
- break;
- default:
- color29 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren29[i27].materials[j27].color = color29;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren30 = weapon.GetComponentsInChildren<Renderer>();
- for (int i28 = 0; i28 < componentsInChildren30.Length; i28++)
- {
- componentsInChildren30[i28].material.color = new Color(1f, 1f, 1f);
- for (int j28 = 0; j28 < componentsInChildren30[i28].materials.Length; j28++)
- {
- Color color30;
- switch (j28)
- {
- case 0:
- color30 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color30 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color30 = new Color(0f, 1f, 0f);
- break;
- default:
- color30 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren30[i28].materials[j28].color = color30;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren31 = weapon.GetComponentsInChildren<Renderer>();
- for (int i29 = 0; i29 < componentsInChildren31.Length; i29++)
- {
- componentsInChildren31[i29].material.color = new Color(1f, 1f, 1f);
- for (int j29 = 0; j29 < componentsInChildren31[i29].materials.Length; j29++)
- {
- Color color31;
- switch (j29)
- {
- case 0:
- color31 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color31 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color31 = new Color(0f, 1f, 0f);
- break;
- default:
- color31 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren31[i29].materials[j29].color = color31;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren32 = weapon.GetComponentsInChildren<Renderer>();
- for (int i30 = 0; i30 < componentsInChildren32.Length; i30++)
- {
- componentsInChildren32[i30].material.color = new Color(1f, 1f, 1f);
- for (int j30 = 0; j30 < componentsInChildren32[i30].materials.Length; j30++)
- {
- Color color32;
- switch (j30)
- {
- case 0:
- color32 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color32 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color32 = new Color(0f, 1f, 0f);
- break;
- default:
- color32 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren32[i30].materials[j30].color = color32;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren33 = weapon.GetComponentsInChildren<Renderer>();
- for (int i31 = 0; i31 < componentsInChildren33.Length; i31++)
- {
- componentsInChildren33[i31].material.color = new Color(1f, 1f, 1f);
- for (int j31 = 0; j31 < componentsInChildren33[i31].materials.Length; j31++)
- {
- Color color33;
- switch (j31)
- {
- case 0:
- color33 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color33 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color33 = new Color(0f, 1f, 0f);
- break;
- default:
- color33 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren33[i31].materials[j31].color = color33;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "MeleeUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.AddComponent<MeleeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.AddComponent<CollisionDamage>();
- weapon.AddComponent<CollisionWeapon>();
- weapon.GetComponentInChildren<CollisionWeapon>().ignoreTeamMates = true;
- weapon.GetComponentInChildren<CollisionWeapon>().impactMultiplier *= 100f;
- weapon.GetComponentInChildren<CollisionWeapon>().onImpactForce = 0.1f;
- weapon.GetComponentInChildren<CollisionWeapon>().dontCallEffectsOnTeam = true;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.GetComponentInChildren<CollisionWeapon>().damage *= 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().massCap = 1f;
- weapon.GetComponentInChildren<CollisionWeapon>().onlyCollideWithRigs = false;
- weapon.GetComponentInChildren<CollisionWeapon>().screenShakeMultiplier = 0f;
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Weapon>().maxRange *= 1.1f;
- weapon.GetComponentInChildren<Weapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<Weapon>().internalCooldown *= 1.3f;
- weapon.GetComponentInChildren<Weapon>().randomCooldown = true;
- weapon.GetComponentInChildren<Weapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<Weapon>().countSelf = false;
- weapon.GetComponentInChildren<Weapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<Weapon>().isRange = false;
- weapon.GetComponentInChildren<Weapon>().levelMultiplier *= 1f;
- weapon.GetComponentInChildren<Weapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<Weapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<Weapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<Weapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- weapon.GetComponentInChildren<MeleeWeapon>().canDealDamageOutSideOfSwing = true;
- weapon.GetComponentInChildren<MeleeWeapon>().requiredPowerToParry *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().setDirectionContinious = false;
- weapon.GetComponentInChildren<MeleeWeapon>().maxAngle *= 0.5f;
- weapon.GetComponentInChildren<MeleeWeapon>().yTargetOffset *= 1f;
- weapon.GetComponentInChildren<MeleeWeapon>().curveForce *= 0.7f;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren34 = weapon.GetComponentsInChildren<Renderer>();
- for (int i32 = 0; i32 < componentsInChildren34.Length; i32++)
- {
- componentsInChildren34[i32].material.color = new Color(1f, 1f, 1f);
- for (int j32 = 0; j32 < componentsInChildren34[i32].materials.Length; j32++)
- {
- Color color34;
- switch (j32)
- {
- case 0:
- color34 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color34 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color34 = new Color(0f, 1f, 0f);
- break;
- default:
- color34 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren34[i32].materials[j32].color = color34;
- }
- }
- }
- }
- }
- }
- UMH.comment = "Ranged";
- UMH.comment = "________________________________________________________________________________";
- UMH.comment = " ";
- UMH.comment = " ";
- UMH.comment = " ";
- UMH.comment = " ";
- UMH.comment = "________________________________________________________________________________";
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component18 = weapon.GetComponent<RangeWeapon>();
- component18.numberOfObjects = component18.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren35 = weapon.GetComponentsInChildren<Renderer>();
- for (int k2 = 0; k2 < componentsInChildren35.Length; k2++)
- {
- componentsInChildren35[k2].material.color = new Color(1f, 1f, 1f);
- for (int l2 = 0; l2 < componentsInChildren35[k2].materials.Length; l2++)
- {
- Color color35;
- switch (l2)
- {
- case 0:
- color35 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color35 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color35 = new Color(0f, 1f, 0f);
- break;
- default:
- color35 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren35[k2].materials[l2].color = color35;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component19 = weapon.GetComponent<RangeWeapon>();
- component19.numberOfObjects = component19.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren36 = weapon.GetComponentsInChildren<Renderer>();
- for (int k3 = 0; k3 < componentsInChildren36.Length; k3++)
- {
- componentsInChildren36[k3].material.color = new Color(1f, 1f, 1f);
- for (int l3 = 0; l3 < componentsInChildren36[k3].materials.Length; l3++)
- {
- Color color36;
- switch (l3)
- {
- case 0:
- color36 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color36 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color36 = new Color(0f, 1f, 0f);
- break;
- default:
- color36 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren36[k3].materials[l3].color = color36;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component20 = weapon.GetComponent<RangeWeapon>();
- component20.numberOfObjects = component20.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren37 = weapon.GetComponentsInChildren<Renderer>();
- for (int k4 = 0; k4 < componentsInChildren37.Length; k4++)
- {
- componentsInChildren37[k4].material.color = new Color(1f, 1f, 1f);
- for (int l4 = 0; l4 < componentsInChildren37[k4].materials.Length; l4++)
- {
- Color color37;
- switch (l4)
- {
- case 0:
- color37 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color37 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color37 = new Color(0f, 1f, 0f);
- break;
- default:
- color37 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren37[k4].materials[l4].color = color37;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component21 = weapon.GetComponent<RangeWeapon>();
- component21.numberOfObjects = component21.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren38 = weapon.GetComponentsInChildren<Renderer>();
- for (int k5 = 0; k5 < componentsInChildren38.Length; k5++)
- {
- componentsInChildren38[k5].material.color = new Color(1f, 1f, 1f);
- for (int l5 = 0; l5 < componentsInChildren38[k5].materials.Length; l5++)
- {
- Color color38;
- switch (l5)
- {
- case 0:
- color38 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color38 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color38 = new Color(0f, 1f, 0f);
- break;
- default:
- color38 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren38[k5].materials[l5].color = color38;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition += new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.relativePosition -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<Holdable>().holdableData.forwardRotation += new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData.upRotation += new Vector3(0f, 0f, 0f);
- holdableData = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component22 = weapon.GetComponent<RangeWeapon>();
- component22.numberOfObjects = component22.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren39 = weapon.GetComponentsInChildren<Renderer>();
- for (int k6 = 0; k6 < componentsInChildren39.Length; k6++)
- {
- componentsInChildren39[k6].material.color = new Color(1f, 1f, 1f);
- for (int l6 = 0; l6 < componentsInChildren39[k6].materials.Length; l6++)
- {
- Color color39;
- switch (l6)
- {
- case 0:
- color39 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color39 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color39 = new Color(0f, 1f, 0f);
- break;
- default:
- color39 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren39[k6].materials[l6].color = color39;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData2 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData2.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData2 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData2.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData2 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData2.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData2 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData2.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData2 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData2.upRotation += new Vector3(0f, 0f, 0f);
- holdableData2 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData2.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component23 = weapon.GetComponent<RangeWeapon>();
- component23.numberOfObjects = component23.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren40 = weapon.GetComponentsInChildren<Renderer>();
- for (int k7 = 0; k7 < componentsInChildren40.Length; k7++)
- {
- componentsInChildren40[k7].material.color = new Color(1f, 1f, 1f);
- for (int l7 = 0; l7 < componentsInChildren40[k7].materials.Length; l7++)
- {
- Color color40;
- switch (l7)
- {
- case 0:
- color40 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color40 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color40 = new Color(0f, 1f, 0f);
- break;
- default:
- color40 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren40[k7].materials[l7].color = color40;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData3 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData3.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData3 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData3.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData3 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData3.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData3 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData3.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData3 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData3.upRotation += new Vector3(0f, 0f, 0f);
- holdableData3 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData3.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component24 = weapon.GetComponent<RangeWeapon>();
- component24.numberOfObjects = component24.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren41 = weapon.GetComponentsInChildren<Renderer>();
- for (int k8 = 0; k8 < componentsInChildren41.Length; k8++)
- {
- componentsInChildren41[k8].material.color = new Color(1f, 1f, 1f);
- for (int l8 = 0; l8 < componentsInChildren41[k8].materials.Length; l8++)
- {
- Color color41;
- switch (l8)
- {
- case 0:
- color41 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color41 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color41 = new Color(0f, 1f, 0f);
- break;
- default:
- color41 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren41[k8].materials[l8].color = color41;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData4 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData4.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData4 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData4.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData4 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData4.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData4 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData4.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData4 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData4.upRotation += new Vector3(0f, 0f, 0f);
- holdableData4 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData4.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component25 = weapon.GetComponent<RangeWeapon>();
- component25.numberOfObjects = component25.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren42 = weapon.GetComponentsInChildren<Renderer>();
- for (int k9 = 0; k9 < componentsInChildren42.Length; k9++)
- {
- componentsInChildren42[k9].material.color = new Color(1f, 1f, 1f);
- for (int l9 = 0; l9 < componentsInChildren42[k9].materials.Length; l9++)
- {
- Color color42;
- switch (l9)
- {
- case 0:
- color42 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color42 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color42 = new Color(0f, 1f, 0f);
- break;
- default:
- color42 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren42[k9].materials[l9].color = color42;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData5 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData5.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData5 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData5.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData5 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData5.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData5 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData5.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData5 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData5.upRotation += new Vector3(0f, 0f, 0f);
- holdableData5 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData5.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component26 = weapon.GetComponent<RangeWeapon>();
- component26.numberOfObjects = component26.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren43 = weapon.GetComponentsInChildren<Renderer>();
- for (int k10 = 0; k10 < componentsInChildren43.Length; k10++)
- {
- componentsInChildren43[k10].material.color = new Color(1f, 1f, 1f);
- for (int l10 = 0; l10 < componentsInChildren43[k10].materials.Length; l10++)
- {
- Color color43;
- switch (l10)
- {
- case 0:
- color43 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color43 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color43 = new Color(0f, 1f, 0f);
- break;
- default:
- color43 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren43[k10].materials[l10].color = color43;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData6 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData6.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData6 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData6.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData6 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData6.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData6 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData6.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData6 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData6.upRotation += new Vector3(0f, 0f, 0f);
- holdableData6 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData6.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component27 = weapon.GetComponent<RangeWeapon>();
- component27.numberOfObjects = component27.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren44 = weapon.GetComponentsInChildren<Renderer>();
- for (int k11 = 0; k11 < componentsInChildren44.Length; k11++)
- {
- componentsInChildren44[k11].material.color = new Color(1f, 1f, 1f);
- for (int l11 = 0; l11 < componentsInChildren44[k11].materials.Length; l11++)
- {
- Color color44;
- switch (l11)
- {
- case 0:
- color44 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color44 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color44 = new Color(0f, 1f, 0f);
- break;
- default:
- color44 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren44[k11].materials[l11].color = color44;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData7 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableData7.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData7 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData7;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData7 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData7;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData7 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData7;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData7 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData7;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData7 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData7;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component7 = weapon.GetComponent<RangeWeapon>();
- component7.numberOfObjects = component7.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren45 = weapon.GetComponentsInChildren<Renderer>();
- for (int k12 = 0; k12 < componentsInChildren45.Length; k12++)
- {
- componentsInChildren45[k12].material.color = new Color(1f, 1f, 1f);
- for (int l12 = 0; l12 < componentsInChildren45[k12].materials.Length; l12++)
- {
- Color color45;
- switch (l12)
- {
- case 0:
- color45 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color45 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color45 = new Color(0f, 1f, 0f);
- break;
- default:
- color45 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren45[k12].materials[l12].color = color45;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData8 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData8;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData8 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData8;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData8 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData8;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData8 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData8;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData8 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData8;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData8 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData8;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component8 = weapon.GetComponent<RangeWeapon>();
- component8.numberOfObjects = component8.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren46 = weapon.GetComponentsInChildren<Renderer>();
- for (int k13 = 0; k13 < componentsInChildren46.Length; k13++)
- {
- componentsInChildren46[k13].material.color = new Color(1f, 1f, 1f);
- for (int l13 = 0; l13 < componentsInChildren46[k13].materials.Length; l13++)
- {
- Color color46;
- switch (l13)
- {
- case 0:
- color46 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color46 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color46 = new Color(0f, 1f, 0f);
- break;
- default:
- color46 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren46[k13].materials[l13].color = color46;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData9 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData9;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData9 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData9;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData9 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData9;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData9 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData9;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData9 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData9;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData9 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData9;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component9 = weapon.GetComponent<RangeWeapon>();
- component9.numberOfObjects = component9.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren47 = weapon.GetComponentsInChildren<Renderer>();
- for (int k14 = 0; k14 < componentsInChildren47.Length; k14++)
- {
- componentsInChildren47[k14].material.color = new Color(1f, 1f, 1f);
- for (int l14 = 0; l14 < componentsInChildren47[k14].materials.Length; l14++)
- {
- Color color47;
- switch (l14)
- {
- case 0:
- color47 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color47 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color47 = new Color(0f, 1f, 0f);
- break;
- default:
- color47 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren47[k14].materials[l14].color = color47;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData10 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData10;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData10 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData10;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData10 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData10;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData10 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData10;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData10 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData10;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData10 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData10;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component10 = weapon.GetComponent<RangeWeapon>();
- component10.numberOfObjects = component10.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren48 = weapon.GetComponentsInChildren<Renderer>();
- for (int k15 = 0; k15 < componentsInChildren48.Length; k15++)
- {
- componentsInChildren48[k15].material.color = new Color(1f, 1f, 1f);
- for (int l15 = 0; l15 < componentsInChildren48[k15].materials.Length; l15++)
- {
- Color color48;
- switch (l15)
- {
- case 0:
- color48 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color48 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color48 = new Color(0f, 1f, 0f);
- break;
- default:
- color48 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren48[k15].materials[l15].color = color48;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData11 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData11;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData11 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData11;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData11 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData11;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData11 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData11;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData11 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData11;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData11 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData11;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component11 = weapon.GetComponent<RangeWeapon>();
- component11.numberOfObjects = component11.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren49 = weapon.GetComponentsInChildren<Renderer>();
- for (int k16 = 0; k16 < componentsInChildren49.Length; k16++)
- {
- componentsInChildren49[k16].material.color = new Color(1f, 1f, 1f);
- for (int l16 = 0; l16 < componentsInChildren49[k16].materials.Length; l16++)
- {
- Color color49;
- switch (l16)
- {
- case 0:
- color49 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color49 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color49 = new Color(0f, 1f, 0f);
- break;
- default:
- color49 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren49[k16].materials[l16].color = color49;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData12 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData12;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData12 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData12;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData12 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData12;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData12 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData12;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData12 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData12;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData12 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData12;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component12 = weapon.GetComponent<RangeWeapon>();
- component12.numberOfObjects = component12.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren50 = weapon.GetComponentsInChildren<Renderer>();
- for (int k17 = 0; k17 < componentsInChildren50.Length; k17++)
- {
- componentsInChildren50[k17].material.color = new Color(1f, 1f, 1f);
- for (int l17 = 0; l17 < componentsInChildren50[k17].materials.Length; l17++)
- {
- Color color50;
- switch (l17)
- {
- case 0:
- color50 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color50 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color50 = new Color(0f, 1f, 0f);
- break;
- default:
- color50 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren50[k17].materials[l17].color = color50;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData13 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData13;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData13 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData13;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData13 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData13;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData13 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData13;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData13 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData13;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData13 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData13;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component13 = weapon.GetComponent<RangeWeapon>();
- component13.numberOfObjects = component13.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren51 = weapon.GetComponentsInChildren<Renderer>();
- for (int k18 = 0; k18 < componentsInChildren51.Length; k18++)
- {
- componentsInChildren51[k18].material.color = new Color(1f, 1f, 1f);
- for (int l18 = 0; l18 < componentsInChildren51[k18].materials.Length; l18++)
- {
- Color color51;
- switch (l18)
- {
- case 0:
- color51 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color51 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color51 = new Color(0f, 1f, 0f);
- break;
- default:
- color51 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren51[k18].materials[l18].color = color51;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData14 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData14;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData14 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData14;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData14 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData14;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData14 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData14;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData14 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData14;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData14 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData14;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component14 = weapon.GetComponent<RangeWeapon>();
- component14.numberOfObjects = component14.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren52 = weapon.GetComponentsInChildren<Renderer>();
- for (int k19 = 0; k19 < componentsInChildren52.Length; k19++)
- {
- componentsInChildren52[k19].material.color = new Color(1f, 1f, 1f);
- for (int l19 = 0; l19 < componentsInChildren52[k19].materials.Length; l19++)
- {
- Color color52;
- switch (l19)
- {
- case 0:
- color52 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color52 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color52 = new Color(0f, 1f, 0f);
- break;
- default:
- color52 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren52[k19].materials[l19].color = color52;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData15 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData15;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData15 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData15;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData15 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData15;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData15 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData15;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData15 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData15;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData15 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData15;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component15 = weapon.GetComponent<RangeWeapon>();
- component15.numberOfObjects = component15.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren53 = weapon.GetComponentsInChildren<Renderer>();
- for (int k20 = 0; k20 < componentsInChildren53.Length; k20++)
- {
- componentsInChildren53[k20].material.color = new Color(1f, 1f, 1f);
- for (int l20 = 0; l20 < componentsInChildren53[k20].materials.Length; l20++)
- {
- Color color53;
- switch (l20)
- {
- case 0:
- color53 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color53 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color53 = new Color(0f, 1f, 0f);
- break;
- default:
- color53 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren53[k20].materials[l20].color = color53;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData16 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData16;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData16 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData16;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData16 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData16;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData16 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData16;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData16 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData16;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData16 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData16;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component16 = weapon.GetComponent<RangeWeapon>();
- component16.numberOfObjects = component16.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren54 = weapon.GetComponentsInChildren<Renderer>();
- for (int k21 = 0; k21 < componentsInChildren54.Length; k21++)
- {
- componentsInChildren54[k21].material.color = new Color(1f, 1f, 1f);
- for (int l21 = 0; l21 < componentsInChildren54[k21].materials.Length; l21++)
- {
- Color color54;
- switch (l21)
- {
- case 0:
- color54 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color54 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color54 = new Color(0f, 1f, 0f);
- break;
- default:
- color54 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren54[k21].materials[l21].color = color54;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "")
- {
- UMH.comment = "RangedUnit";
- UMH.comment = "Faction";
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- if (handType == HoldingHandler.HandType.Right || handType == HoldingHandler.HandType.Left)
- {
- weapon.AddComponent<RangeWeapon>();
- weapon.AddComponent<Holdable>();
- weapon.transform.localScale += new Vector3(0f, 0f, 0f);
- weapon.transform.localScale -= new Vector3(0f, 0f, 0f);
- HoldableDataInstance holdableData17 = weapon.GetComponentInChildren<Holdable>().holdableData;
- HoldableDataInstance holdableDataInstance = holdableData17;
- holdableDataInstance.relativePosition += new Vector3(0f, 0f, 0f);
- holdableData17 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData17;
- holdableDataInstance.relativePosition -= new Vector3(0f, 0f, 0f);
- holdableData17 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData17;
- holdableDataInstance.forwardRotation += new Vector3(0f, 0f, 0f);
- holdableData17 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData17;
- holdableDataInstance.forwardRotation -= new Vector3(0f, 0f, 0f);
- holdableData17 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData17;
- holdableDataInstance.upRotation += new Vector3(0f, 0f, 0f);
- holdableData17 = weapon.GetComponentInChildren<Holdable>().holdableData;
- holdableDataInstance = holdableData17;
- holdableDataInstance.upRotation -= new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().deleyPerSpawn *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnDelay *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ShootPosition;
- weapon.GetComponentInChildren<RangeWeapon>().spawnRotation = RangeWeapon.SpawnRotation.TowardsTarget;
- weapon.GetComponentInChildren<RangeWeapon>().extraCDInMelee *= 0.5f;
- weapon.GetComponentInChildren<RangeWeapon>().extraSpreadInMelee *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread *= 1f;
- RangeWeapon component17 = weapon.GetComponent<RangeWeapon>();
- component17.numberOfObjects = component17.numberOfObjects;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomX *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomY *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().randomZ *= 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().shootRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().torsoRecoil *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().maxRange *= 5f;
- weapon.GetComponentInChildren<RangeWeapon>().startOnCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().internalCooldown *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().randomCooldown = false;
- weapon.GetComponentInChildren<RangeWeapon>().callAttackEffects = true;
- weapon.GetComponentInChildren<RangeWeapon>().countSelf = false;
- weapon.GetComponentInChildren<RangeWeapon>().defaultAngularDrag *= 1f;
- weapon.GetComponentInChildren<RangeWeapon>().isRange = false;
- weapon.GetComponentInChildren<RangeWeapon>().useTargetingWhenPossessed = false;
- weapon.GetComponentInChildren<RangeWeapon>().m_weaponTargetType = Weapon.WeaponTargetType.EnemiesOnly;
- weapon.GetComponentInChildren<RangeWeapon>().possessionAimingMode = Weapon.PossessionAimingMode.Forward;
- weapon.GetComponentInChildren<RangeWeapon>().weaponMaterialType = Weapon.WeaponMaterialType.Metal;
- checked
- {
- if (unit.Entity.Name == "ColourEdit")
- {
- Renderer[] componentsInChildren55 = weapon.GetComponentsInChildren<Renderer>();
- for (int k22 = 0; k22 < componentsInChildren55.Length; k22++)
- {
- componentsInChildren55[k22].material.color = new Color(1f, 1f, 1f);
- for (int l22 = 0; l22 < componentsInChildren55[k22].materials.Length; l22++)
- {
- Color color55;
- switch (l22)
- {
- case 0:
- color55 = new Color(1f, 1f, 1f);
- break;
- case 1:
- color55 = new Color(1f, 0f, 0f);
- break;
- case 2:
- color55 = new Color(0f, 1f, 0f);
- break;
- default:
- color55 = new Color(0f, 0f, 1f);
- break;
- }
- componentsInChildren55[k22].materials[l22].color = color55;
- }
- }
- }
- }
- }
- }
- if (unit.Entity.Name == "Midas")
- {
- weapon.GetComponentInChildren<RangeWeapon>().spawnPosition = RangeWeapon.SpawnPosition.ownTorso;
- weapon.GetComponentInChildren<RangeWeapon>().positionOffset = new Vector3(0f, 0f, 0f);
- weapon.GetComponentInChildren<RangeWeapon>().spread = 0f;
- weapon.GetComponent<RangeWeapon>().projectileSpeedSpread = 0f;
- weapon.GetComponentInChildren<RangeWeapon>().charge *= 1f;
- weapon.transform.localScale = new Vector3(0f, 0f, 0f);
- SpellAnimation[] animations = weapon.GetComponentInChildren<WeaponForceAnimation>().animations;
- for (int m2 = 0; m2 < animations.Length; m2 = checked(m2 + 1))
- {
- animations[m2].rigAnimationForce *= 0.8f;
- }
- }
- if (unit.Entity.Name == "Placeholder")
- {
- weapon.GetComponent<Weapon>().maxRange *= 0.7f;
- weapon.GetComponentInChildren<CollisionWeapon>().gameObject.AddComponent<MeleeWeaponAddEffect>().EffectPrefab = database.Weapons[9].GetComponent<RangeWeapon>().objectToSpawn.GetComponentInChildren<ProjectileHit>().objectsToSpawn[0].objectToSpawn.GetComponentInChildren<AddObjectEffect>().EffectPrefab;
- weapon.GetComponentInChildren<CollisionWeapon>().callEffectsOn = CollisionWeapon.CallEffectsOn.Rigidbodies;
- weapon.transform.localScale = new Vector3(1f, 1.2f, 0.8f);
- MeshRenderer[] componentsInChildren56 = weapon.GetComponentsInChildren<MeshRenderer>();
- checked
- {
- for (int n2 = 0; n2 < componentsInChildren56.Length; n2++)
- {
- componentsInChildren56[n2].materials[0].color = Color.green;
- componentsInChildren56[n2].materials[1].color = Color.green;
- }
- weapon.GetComponent<Weapon>().internalCooldown /= 2f;
- weapon.transform.localScale = new Vector3(1f, 1.2f, 0.8f);
- SpellAnimation[] animations2 = weapon.GetComponentInChildren<WeaponForceAnimation>().animations;
- for (int m3 = 0; m3 < animations2.Length; m3++)
- {
- animations2[m3].rigAnimationForce /= 1.3f;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement