Each physical object can have 'actors' who are pushing the object around. This can be used for hover, locking axis, making vehicles, etc. Each physical object can have multiple actors acting on it. An actor usually registers itself with physics scene events (pre-step action) and modifies the parameters on the host physical object.
Пример #1
0
 public void Add(string name, BSActor actor)
 {
     lock (m_actors)
     {
         if (!m_actors.ContainsKey(name))
         {
             m_actors[name] = actor;
         }
     }
 }
Пример #2
0
 public void Add(string name, BSActor actor)
 {
     lock (m_actors)
     {
         if (!m_actors.ContainsKey(name))
         {
             m_actors[name] = actor;
         }
     }
 }
Пример #3
0
        public bool RemoveAndRelease(string name)
        {
            bool ret = false;

            lock (m_actors)
            {
                if (m_actors.ContainsKey(name))
                {
                    BSActor beingRemoved = m_actors[name];
                    m_actors.Remove(name);
                    beingRemoved.Dispose();
                    ret = true;
                }
            }
            return(ret);
        }
Пример #4
0
 public bool TryGetActor(string actorName, out BSActor theActor)
 {
     lock (m_actors)
         return(m_actors.TryGetValue(actorName, out theActor));
 }
Пример #5
0
 public bool TryGetActor(string actorName, out BSActor theActor)
 {
     lock (m_actors)
         return m_actors.TryGetValue(actorName, out theActor);
 }