Beispiel #1
0
        private Actors.CComponent[] _createManagers()
        {
            Actors.CComponent[] managers = new Actors.CComponent[1];

            //drop manager
            Actors.CActor dropManagerRoot = new Actors.Controllers.GameControllers.CDropController();
            managers[0] = new Actors.CComponent(Actors.CReservedAddresses.DROP_CONTROLLER);
            managers[0].addActor(dropManagerRoot, "dropManagerRoot");

            return(managers);
        }
Beispiel #2
0
 public void initComponents(Actors.CComponent component)
 {
     if (_components == null)
     {
         Actors.CComponent[] temp = new Actors.CComponent[] { component };
         _components = new ComponentManager(new ComponentFactory[] { new ComponentFactory(temp) });
     }
     else
     {
         throw new InvalidOperationException("Cannot reinitialize a layer's components once they have been initialized.");
     }
 }
Beispiel #3
0
        //builds a new component from the given actors
        public static void addComponent(Actors.CActor root, Dictionary <string, Actors.CActor> actors)
        {
            if (root == null)
            {
                throw new KotException.KotInvalidActorException("Root actor cannot be null when calling addComponent");
            }

            Actors.CComponent component = new Actors.CComponent(_currentMap.largestAddress + 1);
            component.layer = root.layer;

            addComponent(component);
            addActorToComponent(root, component.address);

            if (actors != null)
            {
                foreach (Actors.CActor actor in actors.Values)
                {
                    addActorToComponent(actor, component.address);
                }
            }
        }
Beispiel #4
0
 private void registerActors(Actors.CComponent component)
 {
 }
Beispiel #5
0
 public void removeComponent(Actors.CComponent component)
 {
     base.RemoveUnit(component, 0);
 }
Beispiel #6
0
 public void addComponent(Actors.CComponent component)
 {
     base.AddUnit(component, 0);
 }
Beispiel #7
0
 public void removeComponent(Actors.CComponent component)
 {
     _components.removeComponent(component);
 }
Beispiel #8
0
 public void addComponent(Actors.CComponent component)
 {
     _components.addComponent(component);
 }
Beispiel #9
0
 public static void switchComponentLayer(Actors.CComponent component, int toLayer)
 {
     _currentMap.switchComponentToLayer(component, toLayer);
 }
Beispiel #10
0
 public static void addComponent(Actors.CComponent component)
 {
     _currentMap.addComponent(component, component.layer);
 }
Beispiel #11
0
 public static void removeComponent(Actors.CComponent component)
 {
     _currentMap.removeComponent(component, component.layer);
 }
Beispiel #12
0
 public void removeComponent(Actors.CComponent component)
 {
     RemoveUnit(component);
 }
Beispiel #13
0
 public void addComponent(Actors.CComponent component)
 {
     AddUnit(component);
 }