Example #1
0
        /// <summary>
        /// Callback called when world gets unloaded.
        /// </summary>
        public void OnUnload()
        {
            if (GameCallbacks.onWorldUnload != null)
            {
                GameCallbacks.onWorldUnload();
            }

            vehicles.Clear();
            player = null;
        }
Example #2
0
		/// <summary>
		/// Callback called when world gets unloaded.
		/// </summary>
		public void OnUnload() {
			// Iterate backwards so pickupable users will be notified before the database.

			for (int i = gameObjectUsers.Count; i > 0; --i) {
				gameObjectUsers[i - 1].DestroyObjects();
			}

			if (GameCallbacks.onWorldUnload != null) {
				GameCallbacks.onWorldUnload();
			}

			player = null;
		}