public void Awake() { rootAnimation = GetComponent <RemotePlayerAnimation>(); rootTransform = GetComponent <Transform>(); rootModelTransform = rootTransform.Find("Model"); psys = new ParticleSystem[2]; psysr = new ParticleSystemRenderer[2]; torchEffect = rootModelTransform.Find("bip/pelvis/spine-1/spine-2/spine-3/r-clavicle/r-upper-arm/r-forearm/r-torch/vfx-torch/blast").GetComponent <ParticleSystem>(); FootEffect = new ParticleSystem[2]; WaterEffect = new ParticleSystem[2]; FootSmokeEffect = new ParticleSystem[2][]; FootSmokeEffect[0] = new ParticleSystem[2]; FootSmokeEffect[1] = new ParticleSystem[2]; FootSmallSmoke = new ParticleSystem[2]; FootLargeSmoke = new ParticleSystem[2]; Transform VFX = rootModelTransform.Find("bip/pelvis/spine-1/spine-2/spine-3/backpack/VFX").GetComponent <Transform>(); psys[0] = VFX.GetChild(0).GetComponent <ParticleSystem>(); psys[1] = VFX.GetChild(1).GetComponent <ParticleSystem>(); psysr[0] = VFX.GetChild(0).Find("flames").GetComponent <ParticleSystemRenderer>(); psysr[1] = VFX.GetChild(1).Find("flames").GetComponent <ParticleSystemRenderer>(); WaterEffect[0] = rootModelTransform.Find("bip/pelvis/l-thigh/l-calf/l-ankle/l-foot/vfx-footsteps/water").GetComponent <ParticleSystem>(); WaterEffect[1] = rootModelTransform.Find("bip/pelvis/r-thigh/r-calf/r-ankle/r-foot/vfx-footsteps/water").GetComponent <ParticleSystem>(); FootSmokeEffect[0][0] = rootModelTransform.Find("bip/pelvis/l-thigh/l-calf/l-ankle/l-foot/vfx-footsteps/smoke").GetComponent <ParticleSystem>(); FootSmokeEffect[0][1] = rootModelTransform.Find("bip/pelvis/l-thigh/l-calf/l-ankle/l-foot/vfx-footsteps/smoke-2").GetComponent <ParticleSystem>(); FootSmokeEffect[1][0] = rootModelTransform.Find("bip/pelvis/r-thigh/r-calf/r-ankle/r-foot/vfx-footsteps/smoke").GetComponent <ParticleSystem>(); FootSmokeEffect[1][1] = rootModelTransform.Find("bip/pelvis/r-thigh/r-calf/r-ankle/r-foot/vfx-footsteps/smoke-2").GetComponent <ParticleSystem>(); FootEffect[0] = rootModelTransform.Find("bip/pelvis/l-thigh/l-calf/l-ankle/l-foot/vfx-footsteps").GetComponent <ParticleSystem>(); FootEffect[1] = rootModelTransform.Find("bip/pelvis/r-thigh/r-calf/r-ankle/r-foot/vfx-footsteps").GetComponent <ParticleSystem>(); FootSmallSmoke[0] = rootModelTransform.Find("bip/pelvis/l-thigh/l-calf/l-ankle/l-foot/vfx-footsteps/smoke").GetComponent <ParticleSystem>(); FootSmallSmoke[1] = rootModelTransform.Find("bip/pelvis/r-thigh/r-calf/r-ankle/r-foot/vfx-footsteps/smoke").GetComponent <ParticleSystem>(); FootLargeSmoke[0] = rootModelTransform.Find("bip/pelvis/l-thigh/l-calf/l-ankle/l-foot/vfx-footsteps/smoke-2").GetComponent <ParticleSystem>(); FootLargeSmoke[1] = rootModelTransform.Find("bip/pelvis/r-thigh/r-calf/r-ankle/r-foot/vfx-footsteps/smoke-2").GetComponent <ParticleSystem>(); solidSoundEvents[0] = "footsteps-0"; solidSoundEvents[1] = "footsteps-1"; solidSoundEvents[2] = "footsteps-2"; solidSoundEvents[3] = "footsteps-3"; collider = new Collider[16]; rootTransform.gameObject.AddComponent <RemoteWarpEffect>(); rootWarp = rootTransform.gameObject.GetComponent <RemoteWarpEffect>(); }
private void Start() { rootTransform = GetComponent <Transform>(); bodyTransform = rootTransform.Find("Model"); rootWarp = rootTransform.GetComponent <RemoteWarpEffect>(); localPlanetId = -1; #if DEBUG positionDebugger = GameObject.CreatePrimitive(PrimitiveType.Sphere); GameObject.Destroy(positionDebugger.GetComponent <SphereCollider>()); positionDebugger.transform.SetParent(rootTransform, false); positionDebugger.transform.localScale = Vector3.one * 30; positionDebugger.GetComponent <MeshRenderer>().material = null; positionDebugger.SetActive(false); #endif }