Game Development Reference
In-Depth Information
020 return instance;
021 }
022 }
023 //--------------------------------------------------------------
024 //C# property to retrieve notifications manager
025 public static NotificationsManager Notifications
026 {
027 get
028 {
029 if(notifications == null) notifications =
instance.GetComponent<NotificationsManager>();
030 return notifications;
031 }
032 }
033 //--------------------------------------------------------------
034 //C# property to retrieve save/load manager
035 public static LoadSaveManager StateManager
036 {
037 get
038 {
039 if(statemanager == null) statemanager =
instance.GetComponent<LoadSaveManager>();
040 return statemanager;
041 }
042 }
043 //--------------------------------------------------------------
044 //C# property to retrieve and set input allowed status
045 public bool InputAllowed
046 {
047 get{return bInputAllowed;}
048
049 set
050 {
051 //Set Input
052 bInputAllowed = value;
053
054 //Post notification about input status changed
055 Notifications.PostNotification(this, "InputChanged");
056 }
057 }
058 //--------------------------------------------------------------
059 //Private variables
060 //--------------------------------------------------------------
061 //Internal reference to single active instance of object - for singleton behaviour
062 private static GameManager instance = null;
063
064 //Internal reference to notifications object
065 private static NotificationsManager notifications = null;
066
067 //Internal reference to Saveload Game Manager
Search WWH ::




Custom Search