Beispiel #1
0
    public override bool Activate(float time)
    {
        if (obj == null)
        {
            return(false);
        }

        RaycastHit2D hit = CheckFront(obj);

        if (hit.transform == null)
        {
            return(false);
        }
        IMortal m = hit.transform.GetComponent <IMortal>();

        if (m == null || m.Blocked)
        {
            return(false);
        }

        if (m is Enemy)
        {
            AchievementsSystem.UnclockAchievement("Monster hunter");
        }

        m.Die();
        return(true);
    }
    private void Start()
    {
        if (curLevelIndex > -1 && curLevelScore > 0)
        {
            LoadProgress();

            if (curLevelIndex == 4)
            {
                AchievementsSystem.UnclockAchievement("High Five");
            }
            if (curLevelIndex == 9)
            {
                PlayerPrefs.SetInt(campaign1CompleteName, 1);
                AchievementsSystem.UnclockAchievement("Ez win");
            }

            int score = levels[curLevelIndex].HighScore;
            if (score == 0 || score > curLevelScore)
            {
                levels[curLevelIndex].HighScore = curLevelScore;
            }
            curLevelScore = 0;
            curLevelIndex = -1;
            SaveProgress();
        }
        LoadProgress();
    }
Beispiel #3
0
    public void ShowTutorial(int index = 0, bool only = false)
    {
        this.only   = only;
        curTutorial = index;
        AchievementsSystem.UnclockAchievement("Tutorial");
        if (tutorials.Length > curTutorial)
        {
            tutorialPnl.SetActive(true);
            tutorialImage.sprite = tutorials[curTutorial].sprite;
            switch (tutorials[curTutorial].index)
            {
            case 0:
                tutorialName.text = LanguageController.Language.t1Name;
                tutorialText.text = LanguageController.Language.t1Text;
                break;

            case 1:
                tutorialName.text = LanguageController.Language.t2Name;
                tutorialText.text = LanguageController.Language.t2Text;
                break;

            case 2:
                tutorialName.text = LanguageController.Language.t3Name;
                tutorialText.text = LanguageController.Language.t3Text;
                break;

            case 3:
                tutorialName.text = LanguageController.Language.t4Name;
                tutorialText.text = LanguageController.Language.t4Text;
                break;

            case 4:
                tutorialName.text = LanguageController.Language.t5Name;
                tutorialText.text = LanguageController.Language.t5Text;
                break;

            case 5:
                tutorialName.text = LanguageController.Language.t6Name;
                tutorialText.text = LanguageController.Language.t6Text;
                break;
            }
        }
    }
 public void InfoBtnClick()
 {
     AchievementsSystem.UnclockAchievement("Creators");
 }