// // Toggles the displayed objects. Will consider using enum or int if it proves more efficient. // Note that this function completely disables the objects. If you just want to turn off the visibility in ENV, // consider using the SceneController.ToggleXXX methods. // JOS: 6/30/2016 public void ToggleDisplayedObjects(int _t) { SmallWorldType _obj = (SmallWorldType)_t; switch (_obj) { case SmallWorldType.MAB: transform.GetChild(0).gameObject.SetActive(!transform.GetChild(0).gameObject.activeSelf); break; case SmallWorldType.OCO: // NYI break; case SmallWorldType.NEO: transform.GetChild(1).gameObject.SetActive(!transform.GetChild(1).gameObject.activeSelf); break; case SmallWorldType.KB: // NYI break; default: // obvs totes do nada break; } }
// Make sure the correct transform is passed in public void FlipBits(FoundFlags _self, SmallWorldType _type) { //Debug.Log(_self.ToString() + " | " + _type.ToString()); switch (_type) { case SmallWorldType.NEO: if (!UserFlagExtensions.HasFlagQuick(LocatedBits[1], _self)) // Make sure it's not already in there { LocatedBits[1] += (int)_self; } //Debug.Log(LocatedBits[1].ToString()); break; case SmallWorldType.MAB: if (!UserFlagExtensions.HasFlagQuick(LocatedBits[2], _self)) // Make sure it's not already in there { LocatedBits[2] += (int)_self; } //Debug.Log(LocatedBits[2].ToString()); break; case SmallWorldType.KB: if (!UserFlagExtensions.HasFlagQuick(LocatedBits[3], _self)) // Make sure it's not already in there { LocatedBits[3] += (int)_self; } //Debug.Log(LocatedBits[3].ToString()); break; case SmallWorldType.Planet: if (!UserFlagExtensions.HasFlagQuick(LocatedBits[0], _self)) // Make sure it's not already in there { LocatedBits[0] += (int)_self; } //Debug.Log(LocatedBits[0].ToString()); break; default: Debug.Log("BAD WORLD PASSED INTO FLIP FUNCTION!"); break; } }