示例#1
0
        public BehaviorGroup(string name, BehaviorGroupCoordinator coordinator, params Behavior[] behaviors)
        {
            this.name        = name;
            this.coordinator = coordinator;

            // register prior to associating behaviors, as they may (should not, but meh!) wish to communicate throughout the system
            // the method called is internal to prevent happenings such as registering the same group under different names
            coordinator.Register(this);

            if (behaviors.Length > 0)
            {
                Associate(behaviors);
            }
        }
示例#2
0
        // TODO: no reason to make .Name setter internal, just pass it through constructor (all three)..

        public BehaviorGroup(string name, BehaviorGroupCoordinator coordinator)
            : this(name, coordinator, new Behavior[] { })
        {
        }