How the shit work - Ghastlymicrowave/Unity-Classic-Rougelike-Engine-UCRE GitHub Wiki

In the current version, the Tileboard.cs monobehavior script handles most everything holding the game together. Most anything refers back to it, I think this is called a singleton or something?

Anyway, Tileboard.cs contains 2d arrays, that could probably we swapped out with grids, that reference:

  • worldTile: super simple classes that only store whether a tile is passable or a wall, for now it could literally be just a bool but its there for now because I intended it to be used to save tile data, when tiles have more information stored about them.
  • Tilescript: monobehavior classes that are the components attached to the tile GameObjects that do everything with the tile
  • the tile GameObjects: they contain either a sprite renderer or a mesh renderer, based on if it's a wall or a passable tile. (though these all start as prefabs with a black tile to indicate that they aren't visible)

A few other of the classes to note:

  • tileActor: any 'Character' in the game. they have inventories, weapons, stats, HP, and have methods for moving around in specific directions.
  • TileActorScript: The GameObject component for a tileActor.
  • TileItem: the GameObject component for any items sitting on a tile.
  • DamageSystem: contained within DamageSystem.cs, this holds a shitton of enums for effects, items, damage types, and has all the methods for sending structs that contain damage values and damage types to inflict damage on actors. This file also contains items.
  • InventoryItem: a general base class for any item that could go in an inventory or on the ground. There are a bunch that derive from this.
    • WeaponItem: weapons, have a damage type, reach, base damage, and damage multiplier.
    • ConsumableItem: base class for consumables.
    • ConsumableEffectItem: Have effects, tick modes, intensity, and duration.
    • InstantEffectItem: Have effects, and intensity.