protected virtual void Awake() { _buffTimer = gameObject.GetComponent <CBuffTimer>(); for (int i = 0; i < Enum.GetValues(typeof(EBuffAbility)).Length; i++) { _buffCoef[i] = 1.0f; _debuffCoef[i] = 1.0f; } // 파라미터가 다른 이벤트 처리 InitPara(); }
public CBuffPara(CBuffTimer myTimer) { AttackCoef = 1.0f; DefenceCoef = 1.0f; MoveSpeedCoef = 1.0f; AttackSpeedCoef = 1.0f; AttackDebuffCoef = 1.0f; DefenceDebuffCoef = 1.0f; MoveSpeedDebuffCoef = 1.0f; AttackSpeedDebuffCoef = 1.0f; timer = myTimer; }
// 추적해서 그릴 타이머 등록 // 이후 등록한 대상의 타이머를 따라 그림 public void RegisterTimer(GameObject timerOwner) { _timer = timerOwner.GetComponent <CBuffTimer>(); _timer.TimerStart += Register; _timer.TimerEnd += Deregister; // 현재 타이머에 맞게 UI 그리기 var regNumList = _timer.GetRegisterNumberList(); foreach (var regNum in regNumList) { Register(regNum); } }
public virtual void DeregisterTimer(GameObject timerOwner) { _timer = timerOwner.GetComponent <CBuffTimer>(); _timer.TimerStart -= Register; _timer.TimerEnd -= Deregister; // 기존에 있던 Ui 전부 삭제 _timerUiList.Clear(); while (_timerUiList.First != null) { var first = _timerUiList.First; first.Value.timerDrawer.SetActive(false); _timerUiList.RemoveFirst(); } }