public void CreateMaskInScene(GuideAimType type, float offsetX, float offsetY, GuidePointerRotateType rotateType, string str, int step, bool mask = false, float alpha = 0.7f) { IsGuiding_ = true; UIManager.Instance.DoDeActive(); switch (type) { case GuideAimType.GAT_MainCrystal: GameObject aim = GameObject.FindGameObjectWithTag("PVE"); creator_.CreateInScene(aim, offsetX, offsetY, rotateType, str, step, alpha, mask); break; case GuideAimType.GAT_MainJiubaHouse: GameObject aim2 = GameObject.FindGameObjectWithTag("jiuba"); creator_.CreateInScene(aim2, offsetX, offsetY, rotateType, str, step, alpha, mask); break; case GuideAimType.GAT_MainCastle: GameObject aim3 = GameObject.FindGameObjectWithTag("Team"); creator_.CreateInScene(aim3, offsetX, offsetY, rotateType, str, step, alpha, mask); break; case GuideAimType.GAT_MainJJC: GameObject aim4 = GameObject.FindGameObjectWithTag("arena"); creator_.CreateInScene(aim4, offsetX, offsetY, rotateType, str, step, alpha, mask); break; default: break; } crtGuideType_ = GuideType.GT_Scene; }
public static int CreateGuideInMainScene(ILuaState lua) { int stk = 1; GuideAimType type = (GuideAimType)L.ToInteger(stk++); float offsetX = (float)L.ToNumber(stk++); float offsetY = (float)L.ToNumber(stk++); GuidePointerRotateType rotateType = (GuidePointerRotateType)L.ToInteger(stk++); string str = (string)L.ToString(stk++); StringTool.UTF8String(ref str); float alpha = (float)L.ToNumber(stk++); bool mask = (bool)L.ToBoolean(stk++); int step = (int)L.ToInteger(stk++); if (Mathf.Approximately(alpha, 0f)) { GuideManager.Instance.CreateMaskInScene(type, offsetX, offsetY, rotateType, str, step, mask); } else { GuideManager.Instance.CreateMaskInScene(type, offsetX, offsetY, rotateType, str, step, mask, alpha); } return(0); }
public GameObject GetGuideAim(GuideAimType gaType) { if (!guideAimDic_.ContainsKey(gaType)) { return(null); } return(guideAimDic_[gaType]); }
public void RemoveGuideAim(GuideAimType gaType) { if (!guideAimDic_.ContainsKey(gaType)) { return; } guideAimDic_.Remove(gaType); }
public void CreateMask(GuideAimType gaType, float offsetX, float offsetY, GuidePointerRotateType rotateType, string str, int step, bool mask = false, float alpha = 0.7f) { if (!guideAimDic_.ContainsKey(gaType)) { return; } IsGuiding_ = true; crtGuideType_ = GuideType.GT_UI; creator_.Create(guideAimDic_[gaType], offsetX, offsetY, rotateType, str, step, alpha, mask); }
public void RegistGuideAim(GameObject go, GuideAimType gaType) { if (!guideAimDic_.ContainsKey(gaType)) { guideAimDic_.Add(gaType, go); } else { guideAimDic_[gaType] = go; } }