示例#1
0
    private void ElementHitHandler(PoleElementController poleElement)
    {
        if (poleElement.isBoss)
        {
            if (poleElement.BossPower == 0)
            {
                onLevelComplete.Invoke(this);
            }
        }
        else
        {
            PoleElements.Remove(poleElement);

            if (PoleElements.Count > 0)
            {
                PoleElements[0].meshCollider.enabled = true;
            }
            else if (PoleElements.Count == 0)
            {
                Obstacle.Rotator.StopRotating();
                Obstacle.RiseTheObstacle(-1);
            }

            lowerTarget -= 0.5f;
            LoweringThePole();
        }

        Count         = PoleElements.Count + LastBlock.BossPower;
        txtCount.text = Count.ToString("00");
    }