public void DrawStrike(IntVec3 center, Vector3 dest) { TM_MeshBolt meshBolt = new TM_MeshBolt(center, dest, FlyingObject_EyeOfTheStorm.lightningMat); meshBolt.CreateBolt(); for (int i = 0; i < 10; i++) { if (fadeTimer[i] <= 0) { from[i] = center; to[i] = dest; fadeTimer[i] = 30; i = 10; } } }
public void DrawStrikeFading() { for (int i = 0; i < 10; i++) { if (fadeTimer[i] > 0) { TM_MeshBolt meshBolt = new TM_MeshBolt(from[i], to[i], FlyingObject_EyeOfTheStorm.lightningMat); meshBolt.CreateFadedBolt(fadeTimer[i] / 30); fadeTimer[i]--; if (fadeTimer[i] == 0) { from[i] = default(IntVec3); to[i] = default(Vector3); } } } }