Beispiel #1
0
        // Token: 0x0600075F RID: 1887 RVA: 0x000670C4 File Offset: 0x000652C4
        public static Mesh NewBoltMesh(float distance, float amplitude)
        {
            AM_MeshMaker.lightningTop = new Vector2(Rand.Range(-0.2f, 0.2f), distance);
            AM_MeshMaker.MakeVerticesBase();
            bool flag = amplitude > 0f;

            if (flag)
            {
                AM_MeshMaker.PeturbVerticesRandomly(amplitude);
            }
            AM_MeshMaker.DoubleVertices();
            return(AM_MeshMaker.MeshFromVerts());
        }
Beispiel #2
0
        // Token: 0x06000766 RID: 1894 RVA: 0x00067580 File Offset: 0x00065780
        public void CreateFadedBolt(int magnitude)
        {
            Vector3 vector;

            vector.x       = (float)this.hitThing.x;
            vector.y       = (float)this.hitThing.y;
            vector.z       = (float)this.hitThing.z;
            this.direction = Quaternion.LookRotation((vector - this.origin).normalized);
            float distance = Vector3.Distance(this.origin, vector);

            this.boltMesh = AM_MeshMaker.NewBoltMesh(distance, 6f);
            Graphics.DrawMesh(this.boltMesh, this.origin, this.direction, FadedMaterialPool.FadedVersionOf(this.mat, (float)magnitude), 0);
        }
Beispiel #3
0
        // Token: 0x06000765 RID: 1893 RVA: 0x000674DC File Offset: 0x000656DC
        public void CreateBolt()
        {
            Vector3 vector;

            vector.x       = (float)this.hitThing.x;
            vector.y       = (float)this.hitThing.y;
            vector.z       = (float)this.hitThing.z;
            this.direction = Quaternion.LookRotation((vector - this.origin).normalized);
            float distance = Vector3.Distance(this.origin, vector);

            this.boltMesh = AM_MeshMaker.NewBoltMesh(distance, 6f);
            Graphics.DrawMesh(this.boltMesh, this.origin, this.direction, this.mat, 0);
        }
Beispiel #4
0
        // Token: 0x06000765 RID: 1893 RVA: 0x000674DC File Offset: 0x000656DC
        public Mesh GetBolt(IntVec3 hitThing, Vector3 origin, Material _mat)
        {
            Vector3 vector;

            vector.x       = (float)hitThing.x;
            vector.y       = (float)hitThing.y;
            vector.z       = (float)hitThing.z;
            this.direction = Quaternion.LookRotation((vector - origin).normalized);
            float distance = Vector3.Distance(origin, vector);

            this.boltMesh = AM_MeshMaker.NewBoltMesh(distance, 6f);
            return(this.boltMesh);
            //    Graphics.DrawMesh(this.boltMesh, this.origin, this.direction, this.mat, 0);
        }