コード例 #1
0
 private int compareCount(EZBindData a, EZBindData b)
 {
     if (a.count < b.count)
     {
         return(-1);
     }
     if (a.count > b.count)
     {
         return(1);
     }
     return(0);
 }
コード例 #2
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
 public void brightBind(EZBindData.BindType bind)
 {
     Predicate<EZBindView> predicate = delegate(EZBindView view) {
         if(view.data.bindType == bind){
             return true;
         };
         return false;
     };
     List<EZBindView> datas = datas_.FindAll(predicate);
     for(int i=0; i<datas.Count; ++i){
         datas[i].bright();
     }
 }
コード例 #3
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
    public EZBindView bright(EZBindData data)
    {
        Predicate<EZBindView> predicate = delegate(EZBindView view) {
            if(view.data.count == data.count){
                return true;
            };
            return false;
        };
        EZBindView bind = datas_.Find(predicate);
        if(bind){

            bind.bright();
            return bind;
        }
        return null;
    }
コード例 #4
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
    public void destroy(EZBindData data)
    {
        Predicate <EZBindView> predicate = delegate(EZBindView view) {
            if (view.data.count == data.count)
            {
                data.count = -1;
                GameObject.DestroyObject(view.gameObject);
                return(true);
            }
            ;
            return(false);
        };

        datas_.RemoveAll(predicate);
        repositionNow();
    }
コード例 #5
0
 private int compareType(EZBindData a, EZBindData b)
 {
     if (a.bindType == EZBindData.BindType.State)
     {
         if (b.bindType != EZBindData.BindType.State)
         {
             return(-1);
         }
     }
     else
     {
         if (b.bindType == EZBindData.BindType.State)
         {
             return(1);
         }
     }
     return(0);
 }
コード例 #6
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
    public bool has(EZBindData data)
    {
        Predicate <EZBindView> predicate = delegate(EZBindView view) {
            if (view.data.count == data.count)
            {
                return(true);
            }
            ;
            return(false);
        };
        EZBindView bind = datas_.Find(predicate);

        if (bind)
        {
            return(true);
        }
        return(false);
    }
コード例 #7
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
    public EZBindView dark(EZBindData data)
    {
        Predicate <EZBindView> predicate = delegate(EZBindView view) {
            if (view.data.count == data.count)
            {
                return(true);
            }
            ;
            return(false);
        };
        EZBindView bind = datas_.Find(predicate);

        if (bind)
        {
            bind.dark();
            return(bind);
        }
        return(null);
    }
コード例 #8
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
    public EZBindView create(EZBindData data)
    {
        GameObject obj = (GameObject)GameObject.Instantiate(this._prototype);

        obj.transform.parent     = this._table.transform;
        obj.name                 = data.style;
        obj.transform.localScale = this._prototype.transform.localScale;
        obj.transform.position   = this._prototype.transform.position;
        obj.SetActive(true);
        EZBindView view = obj.GetComponent <EZBindView>();

        if (view)
        {
            view.data = data;
            datas_.Add(view);
        }
        _table.repositionNow           = true;
        _table.transform.localPosition = tablePosition_;
        data.count = count_;
        count_++;
        return(view);
    }
コード例 #9
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
    public bool has(EZBindData data)
    {
        Predicate<EZBindView> predicate = delegate(EZBindView view) {
            if(view.data.count == data.count){

                return true;
            };
            return false;
        };
        EZBindView bind = datas_.Find(predicate);
        if(bind){
            return true;
        }
        return false;
    }
コード例 #10
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
 public void destroy(EZBindData data)
 {
     Predicate<EZBindView> predicate = delegate(EZBindView view) {
         if(view.data.count == data.count){
             data.count = -1;
             GameObject.DestroyObject(view.gameObject);
             return true;
         };
         return false;
     };
     datas_.RemoveAll(predicate);
     repositionNow();
 }
コード例 #11
0
ファイル: EZHudBindList.cs プロジェクト: nethz/UnityGame
 public EZBindView create(EZBindData data)
 {
     GameObject obj = (GameObject)GameObject.Instantiate(this._prototype);
     obj.transform.parent = this._table.transform;
     obj.name = data.style;
     obj.transform.localScale = this._prototype.transform.localScale;
     obj.transform.position = this._prototype.transform.position;
     obj.SetActive(true);
     EZBindView view = obj.GetComponent<EZBindView>();
     if(view){
         view.data = data;
         datas_.Add(view);
     }
     _table.repositionNow = true;
     _table.transform.localPosition = tablePosition_;
     data.count = count_;
     count_++;
     return view;
 }