public override void OnInit(long funcID, string[] param)
 {
     base.OnInit(funcID, param);
     try
     {
         this.frameName = param[0];
         this.itemName  = param[1];
         this.itemName  = itemName.Replace(":", "/");
         this.emptyType = (MaskEmptyType)int.Parse(param[2]);
         this.animType  = (MaskAnimType)int.Parse(param[3]);
         this.eventName = param[4];
         this.isScene   = int.Parse(param[5]);
         this.m_tick    = false;
         if (param.Length >= 7)
         {
             this.lessPixel = float.Parse(param[6]);
         }
         if (param.Length >= 8)
         {
             this.delayTimeTT = float.Parse(param[7]);
         }
         if (param.Length == 9)
         {
             this.m_rotation = float.Parse(param[8]);
         }
     }
     catch (FormatException exp)
     {
         Debug.LogError("error ==");
     }
 }
 public GuidNewEmptyMask(Material maskMat, MaskEmptyType emptyType, MaskAnimType animType)
 {
     this.m_maskMat = maskMat;
     //this.m_cornPos = cornPos;
     this.m_emptyType = emptyType;
     this.m_animType  = animType;
     //this.m_Radius = Mathf.Max(cornPos[1].x, cornPos[1].y);
 }
示例#3
0
 public void ShowSingleEmpty(Vector2[] emptyPos, MaskEmptyType emptyType, MaskAnimType animType, string eventName)
 {
     if (emptyPos.Length != 4)
     {
         return;
     }
     this.m_maskImg.Visible = true;
     this.m_maskSystem.AddSingleEmpty(emptyPos, emptyType, animType, eventName);
 }
示例#4
0
 public void AddSingleEmpty(Vector2[] pos, MaskEmptyType type, MaskAnimType animType, string eventName)
 {
     this.eventName  = eventName;
     this.m_animType = animType;
     if (type == MaskEmptyType.Circle)
     {
         AddCircle(new List <Vector2[]> {
             pos
         });
         //AddSingleCircle(pos);
     }
     else
     {
         AddRectEmpty(new List <Vector2[]>()
         {
             pos
         });
     }
 }
示例#5
0
 private void OnShowMask(List <Vector2[]> pos, List <MaskEmptyType> type, MaskAnimType animType, string eventName, bool needLongClick)
 {
     this.m_NeedLongClick = needLongClick;
     OnMaskEnableClick(!this.m_NeedLongClick);
     if (pos == null)
     {
         this.m_maskImg.Visible = true;
         this.EnableClickMask   = false;
         //this.m_maskSystem.ClearMask();
     }
     else if (pos.Count == 1)
     {
         this.EnableClickMask = true;
         ShowSingleEmpty(pos[0], type[0], animType, eventName);
     }
     else if (pos.Count > 1)
     {
         this.EnableClickMask   = true;
         this.m_maskImg.Visible = true;
         this.m_maskSystem.AddMutliEmpty(pos, type);
     }
 }
示例#6
0
        public void AddMutliEmpty(List <Vector2[]> pos, List <MaskEmptyType> type)
        {
            if (pos.Count != type.Count)
            {
                Debug.LogError("mask error");
            }
            this.m_animType = MaskAnimType.ToOut;
            List <Vector2[]> circlePos = new List <Vector2[]>();
            List <Vector2[]> rectPos   = new List <Vector2[]>();

            for (int i = 0; i < pos.Count; i++)
            {
                if (type[i] == MaskEmptyType.Circle)
                {
                    circlePos.Add(pos[i]);
                }
                else if (type[i] == MaskEmptyType.Rect)
                {
                    rectPos.Add(pos[i]);
                }
            }
            AddCircle(circlePos);
            AddRectEmpty(rectPos);
        }