public void IncreaseBullets()
 {
     Bullets++;
     Spread += 1.0f;
     OnBulletsChange.Invoke(Bullets);
     OnSpreadChange.Invoke(Spread);
 }
 private void Start()
 {
     OnHealthChange.Invoke(Health);
     OnBulletsChange.Invoke(Bullets);
     OnCritChange.Invoke(CritChance);
     OnAttackSpeedChange.Invoke(AttackSpeed);
     OnBulletSpeedChange.Invoke(BulletsSpeed);
     OnDamageChange.Invoke(Damage);
     OnSpreadChange.Invoke(Spread);
 }
Beispiel #3
0
 private void InvokeValueChangeEvent()
 {
     if (valueChanged != null)
     {
         valueChanged.Invoke(m_value);
     }
 }
Beispiel #4
0
    private void OnValueChange(InputAction.CallbackContext context)
    {
        Vector2 value = context.ReadValue <Vector2>();

        OnXValueChange.Invoke(value.x);
        OnYValueChange.Invoke(value.y);
    }
Beispiel #5
0
 protected virtual void OnValueChangeEvent(double oldValue_, double newValue_)
 {
     if (ValueChangeEvent != null)
     {
         ValueChangeEvent.Invoke(oldValue_, newValue_);
     }
 }
Beispiel #6
0
 private void IntEditor_ValueChanged(NumberEditor <int> sender, int value)
 {
     if (onValueChanged != null)
     {
         onValueChanged.Invoke(value);
     }
 }
Beispiel #7
0
        void setProgress(float pro)
        {
            if (autoOneToZero)
            {
                pro = pro % 1;
            }

            m_value = pro;//记录下
            switch (m_uitype)
            {
            case UiType.IMAGE:
                image.fillAmount = pro;
                break;

            case UiType.SLIDER:
                slider.value = pro;
                break;

            default:
                break;
            }
            valueChangeEvent.Invoke(pro);
            if (updateRt)
            {
                if (isHorizontal)
                {
                    updateRt.anchoredPosition = new Vector2(image.rectTransform.rect.size.x * pro, updateRt.anchoredPosition.y);
                }
                else
                {
                    updateRt.anchoredPosition = new Vector2(updateRt.anchoredPosition.x, -image.rectTransform.rect.size.y * pro);
                }
            }
        }
 private void Update()
 {
     //触发事件
     if (movementVector != Vector2.zero)
     {
         ValueChangeEvent?.Invoke(movementVector);
     }
 }
Beispiel #9
0
    private void CheckOverlap()
    {
        Collider[] results = Physics.OverlapSphere(transform.position, checkDistance, overlapMask, QueryTriggerInteraction.Ignore);

        // Get bounds of each, find the nearest
        List <Vector3> bounds  = GetColliderBounds(results);
        float          closest = FindClosestPoint(bounds);

        // What's the percentage of the overlapping object?
        float percentage = Mathf.InverseLerp(checkDistance / 2.0f, 0.0f, closest);

        OnValueChange.Invoke(percentage);
    }
 public float this[int y, int x]
 {
     get
     {
         return(values_[y, x]);
     }
     set
     {
         values_[y, x] = value;
         bool isTrue = value > 0;
         objects_[y, x].SetActive(isTrue);
         onValueChanged.Invoke(x, y, isTrue);
     }
 }
Beispiel #11
0
 private void Start()
 {
     maxStamina.ForceInit();
     currentStamina.ForceInit();
     valueChange.Invoke(this);
 }
Beispiel #12
0
 public void IncreaseDamage()
 {
     Damage += 0.5f;
     OnDamageChange.Invoke(Damage);
 }
 private void SetValue(Vector3 rotation)
 {
     Value = CalculateValue(rotation);
     OnXValueChange.Invoke(Value.x);
     OnYValueChange.Invoke(Value.y);
 }
Beispiel #14
0
 public void IncreaseCritChance()
 {
     CritChance += CritCHanceIncrease;
     OnCritChange.Invoke(CritChance);
 }
Beispiel #15
0
 private void OnInputChanged(string text)
 {
     Value = text;
     ValueChanged(this, text);
     onValueChanged.Invoke(text);
 }
Beispiel #16
0
 private void Awake()
 {
     killsForMaxSoulEnergy = (int)stageData.GetMaxSoulEnergyKills();
     valueChange.Invoke(this);
 }
Beispiel #17
0
 private void Start()
 {
     valueChange.Invoke(this);
 }
Beispiel #18
0
 private void Start()
 {
     maxExperiencePoints.ForceInit();
     valueChange.Invoke(this);
 }
Beispiel #19
0
 public void IncreaseBulletSpeed()
 {
     BulletsSpeed += 8.0f;
     OnBulletSpeedChange.Invoke(BulletsSpeed);
 }
Beispiel #20
0
 private void ApplyValue(float value)
 {
     SetHandlePosition(value);
     OnValueChange.Invoke(Value);
 }
Beispiel #21
0
 public void IncreaseAttackSpeed()
 {
     AttackSpeed += AttackSpeedIncrease;
     OnAttackSpeedChange.Invoke(AttackSpeed);
 }
Beispiel #22
0
 private void Start()
 {
     currentHealth.ForceInit();
     maxHealth.ForceInit();
     valueChange.Invoke(this);
 }
Beispiel #23
0
 private void SetValue(float rotation)
 {
     Value = Mathf.InverseLerp(minimum, maximum, rotation);
     OnValueChange.Invoke(Value);
 }