예제 #1
0
    public void DestroyPortal()
    {
        switch (Position)
        {
        case PortalPos.left:
            managePortalsHelper.LeftPortalDown();
            break;

        case PortalPos.middle:
            managePortalsHelper.MiiddlePortalDown();
            break;

        case PortalPos.right:
            managePortalsHelper.RightPortalDown();
            break;
        }

        //Increase Player score
        pointSystem.AddPortalDestroyedPoints();
        // Add in destroy animation
        // Add in destroy Sound Effects
        Destroy(this.gameObject, 1f);
    }