コード例 #1
0
ファイル: Cloud.cs プロジェクト: Bryan9815/SP4
    // Use this for initialization
    protected override void Start()
    {
        id                = 1;
        ClassName         = "Cloud";                                    //Cloud's Class Name
        Sp                = 0;                                          //Cloud's Special Points for ultimate (Sort of)
        Skill_Description = "Deal extreme damage to the nearest enemy.";
        name              = "Cloud";                                    //Name of Cloud
        unlocked          = BoolPrefs.GetBool("Cloud Unlocked", true);
        level             = PlayerPrefs.GetInt("Cloud Level", 1);       //Cloud's Level
        exp               = PlayerPrefs.GetFloat("Cloud EXP", 0);       //Cloud's Experience points

        if (level == 1)
        {
            CalculateStats();
        }
        else
        {
            Hp      = PlayerPrefs.GetFloat("Cloud HP");
            Attack  = PlayerPrefs.GetFloat("Cloud Attack");
            Defense = PlayerPrefs.GetFloat("Cloud Defense");
            Evasion = PlayerPrefs.GetFloat("Cloud Evasion");
            max_exp = PlayerPrefs.GetFloat("Cloud Max_EXP");
        }
        isDead                = false;
        currHp                = Hp;
        InvincibilityTimer    = 0;
        InvincibilityDuration = 2f;
        animator              = gameObject.gameObject.GetComponent <Animator>();
    }
コード例 #2
0
ファイル: Weeb.cs プロジェクト: Bryan9815/SP4
    // Use this for initialization
    protected override void Start()
    {
        id                = 2;
        ClassName         = "Weeb";                                   //Weeb's Class Name
        Sp                = 0;                                        //Weeb's Special Points for ultimate (Sort of)
        Skill_Description = "Boost party attack by 25% of his own attack.";
        //hero_img = ;                                                  //Weeb's Sprite I guess?
        name     = "Weeb";                                             //Name of Weeb
        unlocked = BoolPrefs.GetBool("Weeb Unlocked", true);
        level    = PlayerPrefs.GetInt("Weeb Level", 1);                //Weeb's Level
        exp      = PlayerPrefs.GetFloat("Weeb EXP", 0);                //Weeb's Experience points

        if (level == 1)
        {
            CalculateStats();
        }
        else
        {
            Hp      = PlayerPrefs.GetFloat("Weeb HP");
            Attack  = PlayerPrefs.GetFloat("Weeb Attack");
            Defense = PlayerPrefs.GetFloat("Weeb Defense");
            Evasion = PlayerPrefs.GetFloat("Weeb Evasion");
            max_exp = PlayerPrefs.GetFloat("Weeb Max_EXP");
        }
        isDead                   = false;
        InvincibilityTimer       = 0;
        InvincibilityDuration    = 3f;
        currHp                   = Hp;
        animator                 = gameObject.gameObject.GetComponent <Animator>();
        AttackIncrease           = 0;
        AttackIncreaseDuration   = 5f;
        AttackIncreaseTimer      = 0;
        AttackIncreasePercentage = 0.25f;
    }
コード例 #3
0
 // Use this for initialization
 protected override void Start()
 {
     animator          = GetComponent <Animator> ();
     Sp                = 0;
     ClassName         = "CrimsonKnight";
     name              = "Crimson Knight";
     Skill_Description = "Increases his Defense stat by 50% for 3 seconds.";
     unlocked          = BoolPrefs.GetBool("Crimson Knight Unlocked", false);
     level             = PlayerPrefs.GetInt("Crimson Knight Level", 1);
     exp               = PlayerPrefs.GetFloat("Crimson Knight EXP", 0);
     //Weapon = Resources.Load<BaseWeapon>("Equipment/Weapons/TestWeapon1");
     animator              = GetComponent <Animator>();
     InvincibilityTimer    = 0;
     InvincibilityDuration = 1f;
     isDead                    = false;
     SpecialAttackTimer        = 0.0f;
     SpecialAttackDuration     = 3.0f;
     DefenseIncreasePercentage = 0.5f;  //50% if you couldn't tell
     DefenseIncreaseAmount     = 0;     // used to store amount of defense increased
     if (level == 1)
     {
         CalculateStats();
     }
     else
     {
         Hp      = PlayerPrefs.GetFloat("Crimson Knight HP");
         Attack  = PlayerPrefs.GetFloat("Crimson Knight Attack");
         Defense = PlayerPrefs.GetFloat("Crimson Knight Defense");
         Evasion = PlayerPrefs.GetFloat("Crimson Knight Evasion");
         max_exp = PlayerPrefs.GetFloat("Crimson Knight Max_EXP");
     }
     currHp = Hp;
 }
コード例 #4
0
ファイル: gameUIScene.cs プロジェクト: W0nTh0u3/perlas-game
 public void LoadGameWithLevel()
 {
     PlayerPrefs.SetInt("levelToLoad", LevelSelection);
     BoolPrefs.SetBool("isTimeAttack", false);
     PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber);
     SceneManager.LoadScene(loadSceneNumber);
 }
コード例 #5
0
    // Use this for initialization
    protected override void Start()
    {
        currHp            = Hp;
        id                = 4;
        ClassName         = "Reaper";
        name              = "Reaper";
        Skill_Description = "Throws his scythe forward, dealing damage to all enemies it flies through.";
        Sp                = 0;
        unlocked          = BoolPrefs.GetBool("Reaper Unlocked", false);
        level             = PlayerPrefs.GetInt("Reaper Level", 1);
        exp               = PlayerPrefs.GetFloat("Reaper EXP", 0);

        if (level == 1)
        {
            CalculateStats();
        }
        else
        {
            Hp      = PlayerPrefs.GetFloat("Reaper HP");
            Attack  = PlayerPrefs.GetFloat("Reaper Attack");
            Defense = PlayerPrefs.GetFloat("Reaper Defense");
            Evasion = PlayerPrefs.GetFloat("Reaper Evasion");
            max_exp = PlayerPrefs.GetFloat("Reaper Max_EXP");
        }
        currHp                = Hp;
        isDead                = false;
        animator              = GetComponent <Animator>();
        InvincibilityTimer    = 0;
        InvincibilityDuration = 1f;

        Scythe = GameObject.Find("Scythe");
    }
コード例 #6
0
ファイル: Brawler.cs プロジェクト: Bryan9815/SP4
    // Use this for initialization
    protected override void Start()
    {
        animator          = GetComponent <Animator> ();
        Sp                = 0;
        ClassName         = "Brawler";
        name              = "Brawler";
        Skill_Description = "Does high damage with an uppercut.";
        unlocked          = BoolPrefs.GetBool("Brawler Unlocked", false);
        level             = PlayerPrefs.GetInt("Brawler Level", 1);
        exp               = PlayerPrefs.GetFloat("Brawler EXP", 0);

        //Weapon = Resources.Load<BaseWeapon>("Equipment/Weapons/TestWeapon1");
        animator              = GetComponent <Animator>();
        InvincibilityTimer    = 0;
        InvincibilityDuration = 1f;
        isDead = false;
        if (level == 1)
        {
            CalculateStats();
        }
        else
        {
            Hp      = PlayerPrefs.GetFloat("Brawler HP");
            Attack  = PlayerPrefs.GetFloat("Brawler Attack");
            Defense = PlayerPrefs.GetFloat("Brawler Defense");
            Evasion = PlayerPrefs.GetFloat("Brawler Evasion");
            max_exp = PlayerPrefs.GetFloat("Brawler Max_EXP");
        }
        currHp = Hp;
    }
コード例 #7
0
    // Use this for initialization
    protected override void Start()
    {
        currHp            = Hp;
        id                = 3;
        ClassName         = "Werewolf";
        name              = "Werewolf";
        Sp                = 0;
        Skill_Description = "Heals the entire party in intervals over 3 seconds.";
        unlocked          = BoolPrefs.GetBool("Werewolf Unlocked", true);
        level             = PlayerPrefs.GetInt("Werewolf Level", 1);       //Werewolf's Level
        exp               = PlayerPrefs.GetFloat("Werewolf EXP", 0);       //Werewolf's Experience points

        if (level == 1)
        {
            CalculateStats();
        }
        else
        {
            Hp      = PlayerPrefs.GetFloat("Werewolf HP");
            Attack  = PlayerPrefs.GetFloat("Werewolf Attack");
            Defense = PlayerPrefs.GetFloat("Werewolf Defense");
            Evasion = PlayerPrefs.GetFloat("Werewolf Evasion");
            max_exp = PlayerPrefs.GetFloat("Werewolf Max_EXP");
        }
        currHp                = Hp;
        isDead                = false;
        animator              = GetComponent <Animator> ();
        InvincibilityTimer    = 0f;
        InvincibilityDuration = 1f;
        Heal_Interval         = 0.5f;
        Heal_Timer            = 0f;
        percenthp_heal        = 0.1f;
    }
コード例 #8
0
ファイル: gameUIScene.cs プロジェクト: W0nTh0u3/perlas-game
 public void LoadTimeAttackGame()
 {
     PlayerPrefs.SetInt("levelToLoad", 0);
     //SceneManager.LoadScene(timeAttackSceneNumber);
     BoolPrefs.SetBool("isTimeAttack", true);
     PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber);
     SceneManager.LoadScene(loadSceneNumber);
 }
コード例 #9
0
    void BackToMainMenu()
    {
        PlayerPrefs.SetFloat("SFX", SFX.value);
        PlayerPrefs.SetFloat("Music", Music.value);
        BoolPrefs.SetBool("Vibration", Vibration.isOn);

        SceneManager.LoadScene("MainMenu");
    }
コード例 #10
0
    public void EraseAllData()
    {
        PlayerPrefs.DeleteAll();
        SFX.value      = PlayerPrefs.GetFloat("SFX", 100);
        Music.value    = PlayerPrefs.GetFloat("Music", 100);
        Vibration.isOn = BoolPrefs.GetBool("Vibration", true);

        dataErased = true;
    }
コード例 #11
0
    public void LoadNextLevelGame()
    {
        int NextLevel = PlayerPrefs.GetInt("levelToLoad") + 1;

        PlayerPrefs.SetInt("levelToLoad", NextLevel);
        BoolPrefs.SetBool("isTimeAttack", false);
        PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber);
        SceneManager.LoadScene(loadSceneNumber);
    }
コード例 #12
0
    // Use this for initialization
    void Start()
    {
        dataErased = false;

        SFX.value      = PlayerPrefs.GetFloat("SFX", 100);
        Music.value    = PlayerPrefs.GetFloat("Music", 100);
        Vibration.isOn = BoolPrefs.GetBool("Vibration", true);

        // Buttons
        EraseData.onClick.AddListener(delegate { EraseAllData(); });
        ReturnToMainMenu.onClick.AddListener(delegate { BackToMainMenu(); });
    }
コード例 #13
0
ファイル: gameMismo.cs プロジェクト: W0nTh0u3/perlas-game
    void Start()
    {
        Debug.Log("Save Data Path: " + Application.persistentDataPath.ToString());
        animationRedGreen.Play("DefaultDraw");
        isZenMode = BoolPrefs.GetBool("isTimeAttack");
        if (isZenMode == false)
        {
            numLevelClicked = PlayerPrefs.GetInt("levelToLoad");
        }
        loadedData = saveSystem.LoadData();
        Button btn = recognizeButton.GetComponent <Button> ();

        btn.onClick.AddListener(TaskOnClick);
        platform = Application.platform;
        Debug.Log("Is Zen Mode? " + isZenMode.ToString());
        Debug.Log("This Is Level: " + numLevelClicked.ToString());
        //Load pre-made gestures
        LoadHintImagesResources();
        TextAsset[] gesturesXml = Resources.LoadAll <TextAsset> ("GestureSet/newSetBaybayin/");
        foreach (TextAsset gestureXml in gesturesXml)
        {
            trainingSet.Add(GestureIO.ReadGestureFromXML(gestureXml.text));
        }
        selections       = trainingSet.ToArray();
        hintImage.sprite = blankSquare;
        giveUpButton.SetActive(false);
        if (isZenMode == true)
        {
            nextLevelBtn.SetActive(false);
            scoreLabel.text    = "Score:\n" + Score;
            levelDescText.text = "";
            Shuffler();
        }
        else
        {
            LoadLevelLetters();
            FindLettersClassic();
            scoreLabel.text    = "";
            levelDescText.text = "Level " + numLevelClicked + ":\n" + "\"" + levelDescName + "\"";
        }
        drawLabel.text      = "";
        countDownLabel.text = "";
    }
コード例 #14
0
 public override void Set_Unlocked(bool newBool)
 {
     unlocked = newBool;
     BoolPrefs.SetBool("Reaper Unlocked", unlocked);
 }
コード例 #15
0
ファイル: Town.cs プロジェクト: Bryan9815/SP4
 // Use this for initialization
 void Awake()
 {
     SeenTutorial    = BoolPrefs.GetBool("Seen Tutorial", false);
     ThatAudioSource = GameObject.Find("TownMusic").GetComponent <AudioSource>();
     enterMenus      = GameObject.Find("EnterMenus").GetComponent <AudioSource>();
 }
コード例 #16
0
 public override void Set_Unlocked(bool newBool)
 {
     unlocked = newBool;
     BoolPrefs.SetBool("Crimson Knight Unlocked", unlocked);
 }
コード例 #17
0
ファイル: TutorialManager.cs プロジェクト: Bryan9815/SP4
    // Update is called once per frame
    void Update()
    {
        if (runGameplayTutorial)
        {
            for (int i = 0; i < gameplayTutorialSequence.Length; i++)
            {
                if (i != counter)
                {
                    gameplayTutorialSequence [i].SetActive(false);
                }
                else
                {
                    gameplayTutorialSequence [i].SetActive(true);
                }
            }
        }
        else
        {
            for (int i = 0; i < tutorialSequence.Length; i++)
            {
                if (i != counter)
                {
                    tutorialSequence [i].SetActive(false);
                }
                else
                {
                    tutorialSequence [i].SetActive(true);
                }
            }
        }

        //end of tutorial
        if (runGameplayTutorial)
        {
            if (counter == gameplayTutorialSequence.Length)
            {
                BoolPrefs.SetBool("Seen Tutorial", true);
                SceneManager.LoadScene("Town");
                loadingScreen.SetActive(false);
            }
        }
        else
        {
            if (counter == tutorialSequence.Length)
            {
                loadingScreen.SetActive(true);
                scene = SceneManager.GetActiveScene();
                if (scene.name == "TownTutorial")
                {
                    SceneManager.LoadScene("Tutorial");
                }
                else if (scene.name == "Tutorial")
                {
                    distance       = Mathf.Sqrt((float)(enemy.transform.position.x - attackCollider.transform.position.x) * (enemy.transform.position.x - attackCollider.transform.position.x));
                    Time.timeScale = 1;

                    if (distance <= 0.5f)
                    {
                        Time.timeScale      = 0;
                        counter             = 0;
                        runGameplayTutorial = true;
                    }
                }
            }
        }
    }