Skip to content

AALUND13/JARL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JARL (Just Another Rounds Library) 1.3.1

JARL (Just Another Rounds Library) is a versatile toolkit that introduces a Armor Framework and provides utilities like CustomCardUnity to streamline the creation of custom cards in Unity.

Feel free send your suggestions or bug report in issues tab.

Features

  • Armor Framework: JARL integrates a flexible Armor Framework, empowering developers to craft their own armor or incorporate methods into armors created by other developers. This is achieved through the utilization of DamageProcessingMethodsAfter and DamageProcessingMethodsBefore, allowing for extensive customization.

  • Custom Card Unity: JARL also includes CustomCard for Unity, a class that can be inherited to create custom cards within the Unity environment.

Usage

Armor Framework

Creating a Armor Type

You can create an armor type by inheriting from the ArmorBase class. Here is an example of an armor type:

public class ExampleArmor : ArmorBase
{
    public override string GetArmorType()
    {
        return "Example";
    }

    public override BarColor GetBarColor()
    {
        return new BarColor(Color.cyan * 0.6f, Color.cyan * 0.45f);
    }

    public override void SetupArmor()
    {
        armorTags.Add("CanArmorPierce");
        reactivateArmorType = ArmorReactivateType.Second;
    }
}

Registering Armor

After creating your armor, you can register it using the RegisterArmorType method from the ArmorFramework class:

void Start()
{
	ArmorFramework.RegisterArmorType(new ExampleArmor());
}

Adding Armor To Players

You can add armor to a player, for example, when a player picks a card, by using the AddArmor method from the ArmorHandler class:

public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
    player.data.GetAdditionalData().armorHandler.AddArmor("Example", 50, 5, 5, ArmorReactivateType.Second, 5);
}

Custom Card Unity

Creating a Custom Card Fr Unity

You can create a custom card unity by inheriting from CustomCardUnity. Here is an example of a custom card for Unity:

using JARL.Abstract;
using JARL.Extensions;
using UnityEngine;

public class ExampleUnityCard : CustomCardUnity
{
    public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
    {
	// Your Code Here
    }

    public override string GetModName()
    {
        return "Your Mod Initials";
    }
}

About

JARL (Just Another Rounds Library)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages