private Tween InitSlotChangePosAnime(WeaponHudStyleType slot, float time, int interval = 1) { return(DOTween.To(() => GetSlotLocalPos(slot), x => SetSlotPos(slot, x), GetSlotLocalPos(slot + interval), time)); }
private Vector3 GetSlotLocalScale(WeaponHudStyleType slot) { return(GetSlotTf(slot).localScale); }
private Tween InitSlotChangeBorderAnime(WeaponHudStyleType slot, float time) { return(DOTween.To(() => GetSlotLocalScale(slot), x => SetSlotScale(slot, Vector3.zero), Vector3.zero, time)); }
private float GetSlotLocalAlpha(WeaponHudStyleType slot) { return(GetSlotTf(slot).GetComponent <CanvasGroup>().alpha); }
private void SetSlotScale(WeaponHudStyleType slot, Vector3 scale) { GetSlotTf(slot).localScale = scale; }
private void SetSlotAlpha(WeaponHudStyleType slot, float alpha) { GetSlotTf(slot).GetComponent <CanvasGroup>().alpha = alpha; }
private void SetSlotPos(WeaponHudStyleType targetSlot, Vector3 pos) { _slotTransforms[StyleDict[targetSlot].index].localPosition = pos; }
private void SetSlotPos(WeaponHudStyleType targetSlot, WeaponHudStyleType posSlot) { _slotTransforms[StyleDict[targetSlot].index].localPosition = _slotPosList[(int)posSlot]; }
private Vector3 GetSlotLocalPos(WeaponHudStyleType slot) { return(GetSlotTf(slot).localPosition); }
private Transform GetSlotTf(WeaponHudStyleType slot) { return(_slotTransforms[StyleDict[slot].index]); }