예제 #1
0
        public EntityTeam(AtlasGlobal atlas, EntityDelegate teamDelegate)
            : base(atlas)
        {
            _delegate = teamDelegate;
            Color = Color.White;
            _team = new List<Entity>();

            _teamArray = new Entity[0];
        }
예제 #2
0
 public Button(int texture_id, Services.PostCategory category)
 {
     texture_id_ = texture_id;
     Texture2D tex = Locator.getTextureManager().getTexture(texture_id);
     size_ = new Vector2(buttonSize);
     category_ = category;
     slot_ = -1;
     getSource = null;
     getTarget = null;
 }
예제 #3
0
        public Button(int texture_id, Services.PostCategory category)
        {
            texture_id_ = texture_id;
            Texture2D tex = Locator.getTextureManager().getTexture(texture_id);

            size_     = new Vector2(buttonSize);
            category_ = category;
            slot_     = -1;
            getSource = null;
            getTarget = null;
        }
예제 #4
0
        private static void ENTITIES_NOT_PLAYER(EntityDelegate e)
        {
            int handle = Game.Player.Character.Handle;

            foreach (Entity enitity in World.GetAllEntities())
            {
                if (enitity.Handle != handle)
                {
                    e(enitity);
                }
            }
        }
 public bool Swappable(EntityTeam team, EntityDelegate entityDelegate)
 {
     return true;
 }
예제 #6
0
 public virtual bool TrySetDelegate(EntityDelegate entityDelegate)
 {
     if (_delegate == null) {
         _delegate = entityDelegate;
         return true;
     }
     else if (_delegate.Swappable(this, entityDelegate)) {
         _delegate = entityDelegate;
         return true;
     }
     return false;
 }
예제 #7
0
 public void SelectorForEach <T1, T2, T3, T4>(SelectorDelegate selector, EntityDelegate <T1, T2, T3, T4> action)
 {
     SelectorForEachGeneric(selector, action.Method, action.Target);
 }
예제 #8
0
 public void SelectorSingle <T1, T2, T3, T4>(GameObject go, SelectorDelegate selector, EntityDelegate <T1, T2, T3, T4> action)
 {
     SelectorSingleGeneric(go, selector, action.Method, action.Target);
 }
예제 #9
0
 public void Single <T1, T2, T3, T4>(GameObject go, EntityDelegate <T1, T2, T3, T4> action, bool isChild = true)
 {
     SingleGeneric(go, action.Method, action.Target, action.Method.GetParameters(), isChild);
 }
예제 #10
0
 public void ForEach <T1, T2, T3, T4, T5>(EntityDelegate <T1, T2, T3, T4, T5> action)
 {
     ForEachGeneric(action.Method, action.Target, action.Method.GetParameters());
 }
예제 #11
0
 public void AddTeam(string key, EntityDelegate teamDelegate)
 {
     var team = new EntityTeam(Atlas, teamDelegate);
     _teams.Add(key, team);
     team.Lock(_key);
 }