예제 #1
0
        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 = TM_MeshMaker.NewBoltMesh(distance);
            Graphics.DrawMesh(this.boltMesh, this.origin, this.direction, this.mat, 0);
        }
예제 #2
0
        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 = TM_MeshMaker.NewBoltMesh(distance);
            //Graphics.DrawMesh(this.boltMesh, this.origin, this.direction, this.mat, 0);
            Graphics.DrawMesh(this.boltMesh, this.origin, this.direction, FadedMaterialPool.FadedVersionOf(this.mat, (float)magnitude), 0);
        }
예제 #3
0
 public Mesh RandomBoltMesh(float range)
 {
     return(TM_MeshMaker.NewBoltMesh(range, 3));
 }