Ejemplo n.º 1
0
 private void ListenFunc(AssembleAcceptBase _assembleAcceptBase)
 {
     if (OnContainerFullAction != null)
     {
         if (CheckMatch_ContainerFull())
         {
             Debug.Log("成功配对ContainerFull");
             OnContainerFullAction.Invoke();
             containeGroupInfos.Clear();
             OnContainerFullAction = null;
         }
     }
     if (OnMatch_OneToOneAction != null)
     {
         if (CheckMatch_OneToOne())
         {
             Debug.Log("成功配对OneToOne");
             OnMatch_OneToOneAction.Invoke();
             acceptBase_OneToOne            = null;
             AssembleContainerBase_OneToOne = null;
             OnMatch_OneToOneAction         = null;
         }
     }
     if (OnMatch_OneToManyAction != null)
     {
         if (CheckMatch_OneToMany())
         {
             Debug.Log("成功配对OneToMany");
             OnMatch_OneToManyAction.Invoke();
             acceptBase_OneToMany = null;
             AssembleContainerBase_OneToMany.Clear();
             OnMatch_OneToManyAction = null;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 注销装配
 /// </summary>
 public virtual void RelieveAssmeble()
 {
     finishAssmeble = false;
     existObj       = null;
     if (OnAssembleRelieve != null)
     {
         OnAssembleRelieve.Invoke(this);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 开始装配
 /// </summary>
 /// <param name="_assembleAction"></param>
 public virtual void BeginAssmeble(AssembleAcceptBase _assembleAction)
 {
     finishAssmeble = false;
     existObj       = _assembleAction;
     useCount++;
     if (OnAssembleBegin != null)
     {
         OnAssembleBegin.Invoke(this);
     }
 }
Ejemplo n.º 4
0
 public void OnMatch_OneToMany(string _acceptName, List <string> _containerName, Action action)
 {
     acceptBase_OneToMany = FindAcceptByName(_acceptName);
     for (int i = 0; i < _containerName.Count; i++)
     {
         AssembleContainerBase assembleContainerBase;
         if ((assembleContainerBase = FindContainerByName(_containerName[i])) != null)
         {
             AssembleContainerBase_OneToMany.Add(assembleContainerBase);
         }
     }
     OnMatch_OneToManyAction = action;
 }
Ejemplo n.º 5
0
 public void OnSelectFunc(AssembleAcceptBase _assembleAcceptBase)
 {
     CurAcccept = _assembleAcceptBase;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 当装配器装配到指定容器中时调用 Action
 /// </summary>
 public void OnMatch_OneToOne(string _acceptName, string _containerName, Action action)
 {
     acceptBase_OneToOne            = FindAcceptByName(_acceptName);
     AssembleContainerBase_OneToOne = FindContainerByName(_containerName);
     OnMatch_OneToOneAction         = action;
 }