// Token: 0x060017F8 RID: 6136 RVA: 0x00081990 File Offset: 0x0007FB90 public void AssignWeapon(global::LoadoutSlotType slot, BaseWeaponDecorator weapon, IUnityItem item) { if (weapon) { BaseWeaponDecorator baseWeaponDecorator; if (this._weapons.TryGetValue(slot, out baseWeaponDecorator) && baseWeaponDecorator) { UnityEngine.Object.Destroy(baseWeaponDecorator.gameObject); } this._weapons[slot] = weapon; weapon.transform.parent = this.Decorator.WeaponAttachPoint; foreach (Transform transform in weapon.gameObject.transform.GetComponentsInChildren <Transform>(true)) { if (transform.gameObject.name == "Head") { transform.gameObject.name = "WeaponHead"; } } LayerUtil.SetLayerRecursively(weapon.gameObject.transform, this.Decorator.gameObject.layer); weapon.transform.localPosition = Vector3.zero; weapon.transform.localRotation = Quaternion.identity; weapon.IsEnabled = (slot == this.CurrentWeaponSlot); weapon.WeaponClass = item.View.ItemClass; } else { this.UnassignWeapon(slot); } }
// Token: 0x060010B2 RID: 4274 RVA: 0x00066E48 File Offset: 0x00065048 public void ShowThirdPersonEffect(CharacterConfig player, QuickItemLogic effectType, int robotLifeTime, int scrapsLifeTime, bool isInstant = false) { robotLifeTime = ((robotLifeTime <= 0) ? 5000 : robotLifeTime); scrapsLifeTime = ((scrapsLifeTime <= 0) ? 3000 : scrapsLifeTime); QuickItemSfx original; if (this._effects.TryGetValue(effectType, out original)) { QuickItemSfx quickItemSfx = UnityEngine.Object.Instantiate(original) as QuickItemSfx; quickItemSfx.ID = this.NextSfxId; if (quickItemSfx) { this._curShownEffects.Add(quickItemSfx.ID, quickItemSfx); quickItemSfx.transform.parent = player.transform; quickItemSfx.transform.localRotation = Quaternion.AngleAxis(-45f, Vector3.up); quickItemSfx.transform.localPosition = new Vector3(0f, 0.2f, 0f); quickItemSfx.Play(robotLifeTime, scrapsLifeTime, isInstant); LayerUtil.SetLayerRecursively(quickItemSfx.transform, UberstrikeLayer.IgnoreRaycast); } } else { Debug.LogError("Failed to get effect: " + effectType); } }
// Token: 0x06001282 RID: 4738 RVA: 0x0006E5A4 File Offset: 0x0006C7A4 public static AvatarDecoratorConfig InstantiateRagdoll(AvatarGearParts gear, Color skinColor) { SkinnedMeshCombiner.Combine(gear.Base, gear.Parts); LayerUtil.SetLayerRecursively(gear.Base.transform, UberstrikeLayer.Ragdoll); gear.Base.GetComponent <SkinnedMeshRenderer>().updateWhenOffscreen = true; AvatarDecoratorConfig component = gear.Base.GetComponent <AvatarDecoratorConfig>(); component.SetSkinColor(skinColor); return(component); }
// Token: 0x06001503 RID: 5379 RVA: 0x00076D5C File Offset: 0x00074F5C private AvatarDecoratorConfig CreateHolo(IUnityItem holo) { AvatarDecoratorConfig avatarDecoratorConfig = null; GameObject gameObject = holo.Create(Vector3.zero, Quaternion.identity); HoloGearItem component = gameObject.GetComponent <HoloGearItem>(); if (component && component.Configuration.Ragdoll) { avatarDecoratorConfig = (UnityEngine.Object.Instantiate(component.Configuration.Ragdoll) as AvatarDecoratorConfig); LayerUtil.SetLayerRecursively(avatarDecoratorConfig.transform, UberstrikeLayer.Ragdoll); SkinnedMeshCombiner.Combine(avatarDecoratorConfig.gameObject, new List <GameObject>()); } UnityEngine.Object.Destroy(gameObject); return(avatarDecoratorConfig); }
public void TurnOnGhostMode() { if (IsLocalPlayer) // see Ghosts { // add ghost layer to layers the camera can see var cameraFollow = FindObjectOfType <CameraFollow>(); cameraFollow.ShowGhosts(); } if (IsLocalPlayer) // TODO this hack prevents errors when player is not local because Animator never setup... { _animator.SetBool("isDead", false); // so ghost can have walk animations again } SetGhostColor(); LayerUtil.SetLayerRecursively(this.gameObject, LayerMask.NameToLayer("Ghost")); }
// Token: 0x0600206D RID: 8301 RVA: 0x0009AE44 File Offset: 0x00099044 private void ConfigureWeaponDecorator(Transform parent) { if (this.Decorator) { this.Decorator.IsEnabled = false; this.Decorator.transform.parent = parent; this.Decorator.DefaultPosition = this.Item.Configuration.Position; this.Decorator.DefaultAngles = this.Item.Configuration.Rotation; this.Decorator.CurrentPosition = this.Item.Configuration.Position; this.Decorator.gameObject.name = this.Slot + " " + this.View.ItemClass; this.Decorator.WeaponClass = this.View.ItemClass; this.Decorator.SetSurfaceEffect(this.Item.Configuration.ParticleEffect); LayerUtil.SetLayerRecursively(this.Decorator.transform, parent.gameObject.layer); } else { Debug.LogError("Failed to configure WeaponDecorator!"); } }
// Token: 0x06001CB2 RID: 7346 RVA: 0x0001317D File Offset: 0x0001137D public static void SetLayerRecursively(Transform transform, UberstrikeLayer layer) { LayerUtil.SetLayerRecursively(transform, (int)layer); }
// Token: 0x06001121 RID: 4385 RVA: 0x0000BDFE File Offset: 0x00009FFE public void SetLayer(UberstrikeLayer layer) { LayerUtil.SetLayerRecursively(base.transform, layer); }