コード例 #1
0
 private Tween InitSlotChangePosAnime(WeaponHudStyleType slot, float time, int interval = 1)
 {
     return(DOTween.To(() => GetSlotLocalPos(slot), x => SetSlotPos(slot, x),
                       GetSlotLocalPos(slot + interval), time));
 }
コード例 #2
0
 private Vector3 GetSlotLocalScale(WeaponHudStyleType slot)
 {
     return(GetSlotTf(slot).localScale);
 }
コード例 #3
0
 private Tween InitSlotChangeBorderAnime(WeaponHudStyleType slot, float time)
 {
     return(DOTween.To(() => GetSlotLocalScale(slot), x => SetSlotScale(slot, Vector3.zero),
                       Vector3.zero, time));
 }
コード例 #4
0
 private float GetSlotLocalAlpha(WeaponHudStyleType slot)
 {
     return(GetSlotTf(slot).GetComponent <CanvasGroup>().alpha);
 }
コード例 #5
0
 private void SetSlotScale(WeaponHudStyleType slot, Vector3 scale)
 {
     GetSlotTf(slot).localScale = scale;
 }
コード例 #6
0
 private void SetSlotAlpha(WeaponHudStyleType slot, float alpha)
 {
     GetSlotTf(slot).GetComponent <CanvasGroup>().alpha = alpha;
 }
コード例 #7
0
 private void SetSlotPos(WeaponHudStyleType targetSlot, Vector3 pos)
 {
     _slotTransforms[StyleDict[targetSlot].index].localPosition = pos;
 }
コード例 #8
0
 private void SetSlotPos(WeaponHudStyleType targetSlot, WeaponHudStyleType posSlot)
 {
     _slotTransforms[StyleDict[targetSlot].index].localPosition = _slotPosList[(int)posSlot];
 }
コード例 #9
0
 private Vector3 GetSlotLocalPos(WeaponHudStyleType slot)
 {
     return(GetSlotTf(slot).localPosition);
 }
コード例 #10
0
 private Transform GetSlotTf(WeaponHudStyleType slot)
 {
     return(_slotTransforms[StyleDict[slot].index]);
 }