예제 #1
0
 // Token: 0x0600137D RID: 4989 RVA: 0x00095543 File Offset: 0x00093943
 public static Mesh NewBoltMesh(Vector2 vector, float str = 3f)
 {
     AdeptusLightningBoltMeshMaker.lightningTop = vector;
     AdeptusLightningBoltMeshMaker.MakeVerticesBase();
     AdeptusLightningBoltMeshMaker.PeturbVerticesRandomly(str);
     AdeptusLightningBoltMeshMaker.DoubleVertices();
     return(AdeptusLightningBoltMeshMaker.MeshFromVerts());
 }
예제 #2
0
 // Token: 0x0600137D RID: 4989 RVA: 0x00095543 File Offset: 0x00093943
 public static Mesh NewBoltMesh(float xMin = -50f, float xMax = 50f, float z = 200f, float str = 3f)
 {
     Rand.PushState();
     AdeptusLightningBoltMeshMaker.lightningTop = new Vector2(Rand.Range(xMin, xMax), z);
     Rand.PopState();
     AdeptusLightningBoltMeshMaker.MakeVerticesBase();
     AdeptusLightningBoltMeshMaker.PeturbVerticesRandomly(str);
     AdeptusLightningBoltMeshMaker.DoubleVertices();
     return(AdeptusLightningBoltMeshMaker.MeshFromVerts());
 }
 // Token: 0x0600139E RID: 5022 RVA: 0x00096090 File Offset: 0x00094490
 public override void FireEvent()
 {
     base.FireEvent();
     if (!this.strikeLoc.IsValid)
     {
         this.strikeLoc = CellFinderLoose.RandomCellWith((IntVec3 sq) => sq.Standable(this.map) && !this.map.roofGrid.Roofed(sq), this.map, 1000);
     }
     this.boltMesh = AdeptusLightningBoltMeshMaker.NewBoltMesh(minX, maxX, Z);
     if (!this.strikeLoc.Fogged(this.map))
     {
         GenExplosion.DoExplosion(this.strikeLoc, this.map, 2.9f, DamageDefOf.Smoke, null, 0, -1f, null, null, null, null, null, 0f, 1, false, null, 0f, 1, 0f, false);
         Vector3 loc = this.strikeLoc.ToVector3Shifted();
         for (int i = 0; i < 4; i++)
         {
             AdeptusMeshBolt bolt = new AdeptusMeshBolt(strikeLoc, loc, MaterialPool.MatFrom(boltstring, ShaderDatabase.Transparent, -1));
             bolt.CreateBolt();
             FleckMaker.ThrowSmoke(loc, this.map, 1.5f);
             FleckMaker.ThrowMicroSparks(loc, this.map);
             FleckMaker.ThrowLightningGlow(loc, this.map, 1.5f);
         }
     }
     SoundInfo info = SoundInfo.InMap(new TargetInfo(this.strikeLoc, this.map, false), MaintenanceType.None);
 }