Ejemplo n.º 1
0
    public void Generate_SkillUpgradeEffectShards(GameStatics.SKILL_TYPE skillType, int amount)
    {
        Vector3 playerPos = PlayerManager.Instance().GetPlayerControl().GetPlayerRigidBody().position;

        for (int i = 0; i < amount; i++)
        {
            Vector3 randomGenPos = new Vector3();
            randomGenPos.y = Random.Range(playerPos.y + 30.0f, playerPos.y + 120.0f);
            randomGenPos.x = Random.Range(playerPos.x - 70.0f, playerPos.x + 70.0f);

            GameObject shard = Instantiate(shard1_GO);

            MemoryShard ms = shard.GetComponent <MemoryShard>();

            if (ms != null)
            {
                ms.SetShard(
                    GameStatics.SHARD_TYPE.EFFECT,
                    randomGenPos,
                    PlayerManager.Instance().GetPlayerControl().GetPlayerRigidBody().transform, true);

                ms.SetSkillShardColor(skillType);

                ms.onGetShard = PlayerManager.Instance().OnGetShard;
            }
        }
    }
Ejemplo n.º 2
0
    public static int MAXSkillLevel(GameStatics.SKILL_TYPE skillType)
    {
        switch (skillType)
        {
        case GameStatics.SKILL_TYPE.MAXHP:
            return(maxSkillLevel_MaxHP);

        case GameStatics.SKILL_TYPE.AIRTIME_DURATION:
            return(maxSkillLevel_AirTimeDuration);

        case GameStatics.SKILL_TYPE.SHARD_PULL_DIST:
            return(maxSkillLevel_ShardPullDistance);

        default:
            return(0);
        }
    }
Ejemplo n.º 3
0
    public static void SetSkillLevel(GameStatics.SKILL_TYPE skillType, int level)
    {
        switch (skillType)
        {
        case GameStatics.SKILL_TYPE.MAXHP:
            skillLevel_MaxHP = level;
            ObscuredPrefs.SetInt(GameStatics.PREFS_SkillLevel_MaxHP, skillLevel_MaxHP);
            break;

        case GameStatics.SKILL_TYPE.AIRTIME_DURATION:
            skillLevel_AirTimeDuration = level;
            ObscuredPrefs.SetInt(GameStatics.PREFS_SkillLevel_AirTimeDuration, skillLevel_AirTimeDuration);
            break;

        case GameStatics.SKILL_TYPE.SHARD_PULL_DIST:
            skillLevel_IncreaseShardsPullDistance = level;
            ObscuredPrefs.SetInt(GameStatics.PREFS_SkillLevel_IncreaseShardsPullDistance, skillLevel_IncreaseShardsPullDistance);
            break;

        default:
            break;
        }
    }