예제 #1
0
        public void CheckHit(Bar playerBar, Bar cpuBar)
        {
            if (IsCollision(playerBar))
            {
                Swing(playerBar);
                BounceHorizontal();
                playerBar.PlaySound();

                playerBar.IncreaseMovementSpeed();
            }

            if (IsCollision(cpuBar))
            {
                Swing(cpuBar);
                BounceHorizontal();
                cpuBar.PlaySound();

                cpuBar.IncreaseMovementSpeed();
            }
        }
예제 #2
0
        public void CheckHit(Bar playerBar, Bar cpuBar)
        {
            if(IsCollision(playerBar))
            {
                Swing(playerBar);
                BounceHorizontal();
                playerBar.PlaySound();

                playerBar.IncreaseMovementSpeed();

            }

            if(IsCollision(cpuBar)) {
                Swing(cpuBar);
                BounceHorizontal();
                cpuBar.PlaySound();

                cpuBar.IncreaseMovementSpeed();
            }
        }