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); }
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); }
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 }); } }