public void MoveSelected(Vector2 Force) { foreach (GameObject g in SelectedGameObjects) { if (g.GetType().IsSubclassOf(typeof(Basic2DObject))) { Basic2DObject b = (Basic2DObject)g; b.ApplyMove(Force, false); } } }
public void ApplyMove(Vector2 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(Basic2DObject))) { Basic2DObject b = (Basic2DObject)g; b.ApplyMove(Force, true); } } } }