public void MoveSelected(Vector3 Force) { foreach (GameObject g in SelectedGameObjects) { if (g.GetType().IsSubclassOf(typeof(Basic3DObject))) { Basic3DObject b = (Basic3DObject)g; b.ApplyMove(Force, false); } } }
public void ApplyMove(Vector3 Force, bool ApplyToChildren) { Position.add(Force); if (ApplyToChildren) { foreach (GameObject g in HierarchyChildren) #if EDITOR && WINDOWS { if (!ParentLevel.LevelForEditing || !g.EditorSelected) #endif { if (g.GetType().IsSubclassOf(typeof(Basic3DObject))) { Basic3DObject b = (Basic3DObject)g; b.ApplyMove(Force, true); } } } }