public static void UpdateActions(ScreenModel ThisModel) { if (ThisModel.GetType() == typeof(Wall)) ((Wall)ThisModel).UpdateActionString(); if (ThisModel.GetType() == typeof(Door)) ((Door)ThisModel).UpdateActionString(); if (ThisModel.GetType() == typeof(Light)) ((Light)ThisModel).UpdateActionString(); }
/* //overloads the compare to method public int CompareTo(object Object) { //if these are the same object (same memory reference) then return 0 if (Object == this) { return (0); } //if not, return -1 as I don't care if it's located or not return (-1); }*/ //to generically find a door public static bool FindTypeOfDoor(ScreenModel Test) { if (Test.GetType() == typeof(Door)) { return (true); } else { return (false); } }