public override void Update(float time) { if (Target == null) { return; } int i, j; for (i = 0; i < (GridSize.X + 1); ++i) { for (j = 0; j < (GridSize.Y + 1); ++j) { CCVertex3F v = OriginalVertex(i, j); v.X += (CCRandom.Next() % (Range * 2)) - Range; v.Y += (CCRandom.Next() % (Range * 2)) - Range; if (Shake) { v.Z += (CCRandom.Next() % (Range * 2)) - Range; } SetVertex(i, j, ref v); } } }
public override void Update(float time) { int i, j; for (i = 0; i < (m_sGridSize.X + 1); ++i) { for (j = 0; j < (m_sGridSize.Y + 1); ++j) { CCVertex3F v = OriginalVertex(new CCGridSize(i, j)); v.X += (CCRandom.Next() % (m_nRandrange * 2)) - m_nRandrange; v.Y += (CCRandom.Next() % (m_nRandrange * 2)) - m_nRandrange; if (m_bShakeZ) { v.Z += (CCRandom.Next() % (m_nRandrange * 2)) - m_nRandrange; } SetVertex(new CCGridSize(i, j), ref v); } } }