public int AddTurret(F3DFXType turret, Transform[] socket) { TurretShot shot = new TurretShot(); shot.prefab = GetPrefab(turret); shot.sockets = socket; turrets.Add(shot); return(turrets.Count - 1); }
TurretPrefabs GetPrefab(F3DFXType turret) { foreach (TurretPrefabs prefab in turretsSetup) { if (prefab.turretType != turret) { continue; } return(prefab); } return(null); }
// Token: 0x0600279D RID: 10141 RVA: 0x000CD878 File Offset: 0x000CBC78 private void OnDespawned() { this.frameNo = 0; if (this.FrameTimerID != -1) { F3DTime.time.RemoveTimer(this.FrameTimerID); this.FrameTimerID = -1; } F3DFXType f3DFXType = this.fxType; if (f3DFXType != F3DFXType.PlasmaBeam) { if (f3DFXType == F3DFXType.PlasmaBeamHeavy) { F3DAudioController.instance.PlasmaBeamHeavyClose(base.transform.position); } } else { F3DAudioController.instance.PlasmaBeamClose(base.transform.position); } }
// Token: 0x0600279C RID: 10140 RVA: 0x000CD7DC File Offset: 0x000CBBDC private void OnSpawned() { if (this.OneShot) { this.Raycast(); } if (this.BeamFrames.Length > 1) { this.Animate(); } F3DFXType f3DFXType = this.fxType; if (f3DFXType != F3DFXType.PlasmaBeam) { if (f3DFXType == F3DFXType.PlasmaBeamHeavy) { F3DAudioController.instance.PlasmaBeamHeavyLoop(base.transform.position, base.transform.parent); } } else { F3DAudioController.instance.PlasmaBeamLoop(base.transform.position, base.transform.parent); } }
// Token: 0x060027F5 RID: 10229 RVA: 0x000CFED8 File Offset: 0x000CE2D8 private void Update() { if (this.isHit) { if (!this.isFXSpawned) { F3DFXType f3DFXType = this.fxType; switch (f3DFXType) { case F3DFXType.Vulcan: F3DFXController.instance.VulcanImpact(this.hitPoint.point + this.hitPoint.normal * 0.2f); this.ApplyForce(2.5f); break; case F3DFXType.SoloGun: F3DFXController.instance.SoloGunImpact(this.hitPoint.point + this.hitPoint.normal * 0.2f); this.ApplyForce(25f); break; default: if (f3DFXType == F3DFXType.LaserImpulse) { F3DFXController.instance.LaserImpulseImpact(this.hitPoint.point + this.hitPoint.normal * 0.2f); this.ApplyForce(25f); } break; case F3DFXType.Seeker: F3DFXController.instance.SeekerImpact(this.hitPoint.point + this.hitPoint.normal * 1f); this.ApplyForce(30f); break; case F3DFXType.PlasmaGun: F3DFXController.instance.PlasmaGunImpact(this.hitPoint.point + this.hitPoint.normal * 0.2f); this.ApplyForce(25f); break; } this.isFXSpawned = true; } if (!this.DelayDespawn || (this.DelayDespawn && this.timer >= this.despawnDelay)) { this.OnProjectileDestroy(); } } else { Vector3 b = this.transform.forward * Time.deltaTime * this.velocity; if (Physics.Raycast(this.transform.position, this.transform.forward, out this.hitPoint, b.magnitude * this.RaycastAdvance, this.layerMask)) { this.isHit = true; if (this.DelayDespawn) { this.timer = 0f; this.Delay(); } } else if (this.timer >= this.lifeTime) { this.OnProjectileDestroy(); } this.transform.position += b; } this.timer += Time.deltaTime; }
public void SwitchWeapon(int id) { Stop(); DefaultFXType = (F3DFXType)id; }