Exemple #1
0
        protected virtual void Update()
        {
            if (!firing.GetIsCasting() && !mageStatus.GetIsInvinc())
            {
                if (Input.GetMouseButtonDown(0) && !Input.GetMouseButton(1) && mageStatus.mana > 0)
                {
                    isStart = true;
                    Fire();
                }
                else if (!isStart && Input.GetMouseButton(0) && !Input.GetMouseButton(1) && mageStatus.mana > 0)
                {
                    isStart = true;
                    Fire();
                }

                else if (isStart && !Input.GetMouseButton(0))
                {
                    isStart = false;
                    Stop();
                }
                else if (isStart && mageStatus.mana <= 0)
                {
                    isStart = false;
                    Stop();
                }
            }
            else
            {
                isStart = false;
                Stop();
            }
        }