// Update is called once per frame void Update() { if (_TgtTF == null || _Dir < 0 || _CtrTF == null) { _L0.enabled = false; _L1.enabled = false; return; } _L0.enabled = true; _L1.enabled = true; // Get start and end pos Vector3 SrcPos = RectTFPosToGlobalPos(_6DirRTFs [_Dir].position); Vector3 CtrPos = RectTFPosToGlobalPos(_CtrTF.position); Vector3 TgtPos = _TgtTF.position; // set path SetLRPath(_L0, SrcPos, CtrPos); SetLRPath(_L1, CtrPos, TgtPos); // set color GameObject Miro = _Mgr.GetSelectedMiroPrefab(); var setting = Miro.GetComponent <MiroV1ModelSetting> (); Color cr = setting._colorSetting._ENMax; SetLRColor(_L0, cr); SetLRColor(_L1, cr); }
public void UpdateDisp() { bool bBanned = _PlacerUI._BanDirs [_Dir]; GameObject miroPref = _MiroMgr.GetSelectedMiroPrefab(); var setting = miroPref.GetComponent <MiroV1ModelSetting> (); Image img = GetComponent <Image> (); if (bBanned) { img.color = _BanColor; } else { img.color = setting._colorSetting._ENMax; } }