• Api Documentation

    Show / Hide Table of Contents
    • CreatorKitCode
      • BaseElementalEffect
      • CharacterData
      • Container
      • ElementalEffect
      • EquipmentItem
      • EquipmentItem.EquipmentSlot
      • EquipmentItem.EquippedEffect
      • EquipmentSystem
      • Helpers
      • HighlightableObject
      • InteractableObject
      • InventorySystem
      • InventorySystem.InventoryEntry
      • Item
      • Loot
      • LootSpawner
      • LootSpawner.LootEntry
      • LootSpawner.SpawnEvent
      • SFXManager
      • SFXManager.PlayData
      • SFXManager.Use
      • SpawnPoint
      • StatSystem
      • StatSystem.DamageType
      • StatSystem.StatModifier
      • StatSystem.StatModifier.Mode
      • StatSystem.Stats
      • StatSystem.TimedStatModifier
      • UsableItem
      • UsableItem.UsageEffect
      • VFXDatabase
      • VFXDatabase.VFXDBEntry
      • VFXManager
      • VFXManager.VFXInstance
      • Weapon
      • Weapon.AttackData
      • Weapon.Stat
      • Weapon.WeaponAttackEffect
    • CreatorKitCodeInternal
      • AmbiencePlayer
      • AnimationControllerDispatcher
      • AnimationControllerDispatcher.IAttackFrameReceiver
      • AnimationControllerDispatcher.IFootstepFrameReceiver
      • AttackState
      • BreakableObject
      • CameraController
      • CharacterAudio
      • CharacterControl
      • DamageUI
      • DamageUI.ActiveText
      • EffectIconUI
      • EquipmentUI
      • InventoryCharacterRender
      • InventoryUI
      • InventoryUI.DragData
      • ItemEntryUI
      • ItemTooltip
      • LootUI
      • RandomBGMPlayer
      • RandomLoopOffset
      • ResourceManager
      • SceneLinkedSMB<TMonoBehaviour>
      • SimpleEnemyController
      • SimpleEnemyController.State
      • TrainingDummy
      • UIAlphaRaycast
      • UISystem

    Namespace CreatorKitCode

    Classes

    BaseElementalEffect

    The base class to derive from to write you own custom Elemental effect that can be added to a StatsSystem. There is a default implementation called ElementalEffect that can be used to make Physical/Fire/Electrical/Cold damage across time.

    A derived class must implement the Equals function so we can check if 2 effects are the same (e.g. the default implementation ElementalEffect will consider 2 effect equal if they do the same DamageType).

    CharacterData

    This defines a character in the game. The name Character is used in a loose sense, it just means something that can be attacked and have some stats including health. It could also be an inanimate object like a breakable box.

    Container

    Special InteractableObject that will trigger the LootSpawner on it when interacted with, and delete itself (a container can only be looted once).

    ElementalEffect

    Default implementation of the BaseElementalEffect. The constructor allows the caller to specify what type of damage is done, how much is done and the speed (time) between each instance of damage (default 1 = every second).

    EquipmentItem

    Special Item than can be equipped. They can have a minimum stats value needed to equip them, and you can add EquippedEffect which will be executed when the object is equipped and unequipped, allowing to code special behaviour when the player equipped those object, like raising stats.

    EquipmentItem.EquippedEffect

    EquipmentSystem

    Handles the equipment stored inside an instance of CharacterData. Will take care of unequipping the previous item when equipping a new one in the same slot.

    Helpers

    Helper class containing diverse functions that avoid redoing common things.

    HighlightableObject

    All object that can be highlighted (enemies, interactable object etc.) derive from this class, which takes care of setting the material parameters for it when it gets highlighted. If the object use another material, it will just ignore all the changes.

    InteractableObject

    Base class for interactable object, inherit from this class and override InteractWith to handle what happen when the player interact with the object.

    InventorySystem

    This handles the inventory of our character. The inventory has a maximum of 32 slot, each slot can hold one TYPE of object, but those can be stacked without limit (e.g. 1 slot used by health potions, but contains 20 health potions)

    InventorySystem.InventoryEntry

    One entry in the inventory. Hold the type of Item and how many there is in that slot.

    Item

    Base clase of all items in the game. This is an abstract class and need to be inherited to specify behaviour. The project offer 3 type of items : UsableItem, Equipment and Weapon

    Loot

    Describes an InteractableObject that can be picked up and grants a specific item when interacted with.

    It will also play a small animation (object going in an arc from spawn point to a random point around) when the object is actually "spawned", and the object becomes interactable only when that animation is finished.

    Finally it will notify the LootUI that a new loot is available in the world so the UI displays the name.

    LootSpawner

    This class handle creating loot. It got a list of events and each events have a list of items with associated weight. When the spawn is triggered through the SpawnLoot function, it will spawn one item per events, with the item being picked randomly per event

    LootSpawner.LootEntry

    LootSpawner.SpawnEvent

    SFXManager

    Class that handle all the SFX. Through its functions you can play a SFX of a given type at a given position. It use pooling to pre-create all the source and recycle them for efficiency reason.

    SFXManager.PlayData

    Store all data used to play a sound. The pitch will be picked randomly between PitchMin and PitchMax.

    SpawnPoint

    When the player walks through the trigger on the same GameObject as this script, the GameObject position becomes the new place where the player will respawn when their health reaches 0.

    StatSystem

    Handles the stats of a CharacterData. It stores the health and strength/agility/defense stats. This class contains various functions for interacting with stats, by adding stat modifications, elemental effects or damage.

    StatSystem.StatModifier

    Can be added to a stack of modifiers on the StatSystem to modify the value of the base stats e.g. a weapon adding +2 strength will push a modifier on the top of the stack.

    They have 2 modes : Absolute, where values are added as is, and Percentage, where values are converted to percentage (e.g. a value of 50 in strength in a Percentage modifier will increase the strength by 50%).

    StatSystem.Stats

    Store the stats, which are composed of 4 values : health, strength, agility and defense. It also contains elemental protections and boost (1 for each elements defined by the DamageType enum)

    StatSystem.TimedStatModifier

    This is a special StatModifier, that gets added to the TimedStatModifier stack, that will be automatically removed when its timer reaches 0. Contains a StatModifier that controls the actual modification.

    UsableItem

    Describe an usable item. A usable item is an item that can be used in the inventory by double clicking on it. When it is used, all the stored UsageEffects will be run, allowing to specify what that item does. (e.g. a AddHealth effect will give health point back to the user)

    UsableItem.UsageEffect

    VFXDatabase

    Allows you to define a list of VFX prefabs each with a name. An editor script takes care of generating a C# file containing an enum with the given name to index the Entries array. This allows you to call methods such as VFXManager.GetVFX(VFXType.MyEffectName). See the VFXManager class for more details.

    VFXDatabase.VFXDBEntry

    An entry in the VFXDatabase, storing all the data needed to create the pools of instances of VFX.

    VFXManager

    Handles displaying VFX in the game. One instance should be in the scene, and is part of the Manager prefab. It will create pools of the VFX prefabs defined in the given VFXDatabase, and through the GetVFX/PlayVFX methods allows you to get an instance at a given position. The pools are rotating queue, so when you are finished with an instance, that instance will be moved to the back of the available instance queue.

    VFXManager.VFXInstance

    One instance of VFX. The Effect field is the actual GameObject of the effect you can disable once it is finished. The Index field is used by the manager to know which effect this instance is part of.

    Weapon

    Special case of EquipmentItem for weapon, as they have a whole attack system in addition. Like Equipment they can have minimum stats and equipped effect, but also have a list of WeaponAttackEffect that will have their OnAttack function called during a hit, and their OnPostAttack function called after all OnAttack of all effects are called.

    Weapon.AttackData

    This class will store damage done to a target CharacterData by a source CharacterData. The function to add damage will take care of applied all the strength/boost of the source and remove defense/resistance of the target.

    The source can be null when its done by an non CharacterData source (elemental effect, environment etc.)

    Weapon.WeaponAttackEffect

    Base class of all effect you can add on a weapon to specialize it. See documentation on How to write a new Weapon Effect.

    Structs

    Weapon.Stat

    Enums

    EquipmentItem.EquipmentSlot

    SFXManager.Use

    StatSystem.DamageType

    The type of damage that exist, each will have their own boost/protection in stats, only the main, Physical, is influence by strength and defense stats.

    StatSystem.StatModifier.Mode

    The mode of the modifier : Percentage will divide the value by 100 to get a percentage, absolute use the value as is.

    Back to top Generated by DocFX