コード例 #1
0
 /// <summary>
 /// Add an simObject to the sim object list.
 /// It must have a weapon system.
 /// </summary>
 /// <param name="simObject"></param>
 private void AddSimObject(SimObject simObject)
 {
     // I only care about SimObject that are not the user and I don't want any repeats.
     if (!simObject.IsUserSim && !SimObjectList.Contains(simObject))
     {
         SimObjectList.Add(simObject);
     }
 }
コード例 #2
0
        /// <summary>
        /// Update the list of SimObject we know about that have weapons.
        /// </summary>
        public void UpdateSimList()
        {
            // Clear the SimObjectList.
            SimObjectList.Clear();

            // Now just get all the SimObject around the user again.
            simulation_connection.GetSimObjectData();
        }