• Manual
  • Scripting API
  • Changelog
  • Contact
Search Results for

    Show / Hide Table of Contents
    • BattleBehaviour
      • BattleBehaviour.Fusion
        • FusionManager
        • GameCharacterFusion
      • Battle
      • BossSize
      • CharacterGroup
      • ScriptableBattlePosition
      • ScriptableBattleStage
      • TeamData
      • BattleBehaviour.Backup
        • BackupState
        • BattleBackup
    • GameActors
      • GameActor
      • GameCharacter
      • GameCharacter.AIState
      • GameItem
    • States
      • BattleState
      • ChangeStageState
      • FightState
      • FightState.LoseCondition
      • FightState.WinCondition
      • PreparationState
      • ResetSceneState
    • Battlefield
      • BattleGrid
      • BattleGrid.GridType
      • Bench
      • GridCell
      • GridCellEffect
      • SellZone
    • BattleUI
      • CharacterEnergyUI
      • CharacterHealthUI
      • CharacterStatsUI
      • DamagePopup
      • ItemDescriptionUI
      • ShopExpBarUI
      • StageUI
      • TraitDescriptionUI
      • TraitListUI
      • TraitListUI.OrderBy
      • TraitStatsUI
      • TraitUI
    • EditorScripts
      • BattleGridEditor
      • BattlePositionEditor
      • BenchEditor
      • GameCharacterEditor
      • NetworkObjectsListEditor
      • NFO_GameCharacterEditor
      • NGO_MenuActions
      • ReadOnlyDrawer
    • Formulas
      • BattleFormulas
      • BattleFormulas.DamageType
    • Movement
      • ApproximateAstarMovement
      • ExactAstarMovement
      • IBattleMovement
      • PathFinding2D
    • Multiplayer
      • BattleBehaviour
        • NetworkObjectList
        • StatsStruct
        • GameActors
          • NGO_GameCharacter
          • NGO_GameItem
        • Player
          • GamePlayer
          • IPlayer
        • States
          • MP_ConnectionState
          • MP_FightState
          • MP_PreparationState
      • ClientTransform
        • ClientNetworkTransform
      • EditorScripts
        • NGO_MenuActions
      • GamingServices
        • GamingServices
          • GamingServices.RelayHostData
          • GamingServices.RelayJoinData
      • UI
        • NetworkManagerUI
    • Shop
      • ScriptableShopItem
      • ShopCharacter
      • ShopGameItem
      • ShopItemInfo
      • ShopLevel
      • ShopLevelManager
      • ShopManager
      • ShopGUI
        • CurrencyUI
        • EquippedItemDescriptionUI
        • ShopItemUI
        • ShopUI
        • SpecialAttackDescriptionUI
        • Timer
      • ShopList
        • IShopList
        • ScriptableDeckList
        • ScriptableGroupItemList
        • ScriptableIndividualItemList
        • ShopItemList
    • Skills
      • ApplyBuffOnHitEffect
      • ApplyDebuffOnHitEffect
      • ArrowEffect
      • BuffEffect
      • BuffEffectInfo
      • FixedDamageOverTimeEffect
      • HealthMeteoriteAllEffect
      • HealthStealEffect
      • IAttackEffect
      • MeleeEffect
      • MeteoriteEffect
      • OnHitEffect
      • Projectile
      • RangedEffect
      • SimpleBuffEffect
      • SwordEffect
      • VariableDamageOverTimeEffect
    • Stats
      • CharacterStats
      • CharacterStats.CharacterStat
      • ItemModificator
      • StatModificator
      • StatsModificator
      • StatsModificator.ModificatorType
      • Trait
      • TraitOption
      • TraitOption.TraitTarget
    • Utility
      • AutoBattleSettings
      • ReadOnlyAttribute
      • UIUtility

    Class BattleGrid

    It allows the movement of characters through the cells that compose it. The Custom Inspector allows to create a grid quickly.

    Inheritance
    Object
    BattleGrid
    Bench
    Namespace: AutoBattleFramework.Battlefield
    Assembly: cs.temp.dll.dll
    Syntax
    public class BattleGrid : MonoBehaviour

    Fields

    CellScale

    When GridSquared or GridHex are instantiated, its X and Z local scale will be multiplied by this value.

    Declaration
    public float CellScale
    Field Value
    Type Description
    Single

    GridCells

    Cells that compose the grid.

    Declaration
    public GridCell[] GridCells
    Field Value
    Type Description
    GridCell[]

    GridHeight

    Number of cells across the width of the grid.

    Declaration
    public int GridHeight
    Field Value
    Type Description
    Int32

    GridHex

    Prefab of the cell used if the grid type is Hex.

    Declaration
    public GridCell GridHex
    Field Value
    Type Description
    GridCell

    GridShape

    Type of grid that will be generated.

    Declaration
    public BattleGrid.GridType GridShape
    Field Value
    Type Description
    BattleGrid.GridType

    GridSquared

    Prefab of the cell used if the grid type is Squared.

    Declaration
    public GridCell GridSquared
    Field Value
    Type Description
    GridCell

    GridWidth

    Number of cells across the width of the grid.

    Declaration
    public int GridWidth
    Field Value
    Type Description
    Int32

    RotateCells

    If true, rotate the cells 15 degrees if hex, 45 if squared.

    Declaration
    public bool RotateCells
    Field Value
    Type Description
    Boolean

    separation

    Separation distance between cells.

    Declaration
    public float separation
    Field Value
    Type Description
    Single

    Team1Drag

    Color of the cell of Team 1 if a character is being dragged over it.

    Declaration
    public Color Team1Drag
    Field Value
    Type Description
    Color

    Team1EmptyCell

    Color of the cell of Team 1 if it is empty.

    Declaration
    public Color Team1EmptyCell
    Field Value
    Type Description
    Color

    Team1OccupiedCell

    Color of the cell of Team 1 if a character is on it.

    Declaration
    public Color Team1OccupiedCell
    Field Value
    Type Description
    Color

    Team1RowNumber

    Number of rows assigned to team 1. The rest will be assigned to group 2.

    Declaration
    public int Team1RowNumber
    Field Value
    Type Description
    Int32

    Team2Drag

    Colo of the cell of Team 2 if a character is being dragged over it.

    Declaration
    public Color Team2Drag
    Field Value
    Type Description
    Color

    Team2EmptyCell

    Color of the cell of Team 2 if it is empty.

    Declaration
    public Color Team2EmptyCell
    Field Value
    Type Description
    Color

    Team2OccupiedCell

    Color of the cell of Team 2 if a character is on it.

    Declaration
    public Color Team2OccupiedCell
    Field Value
    Type Description
    Color

    Methods

    CalculateDistances()

    Pre-calculates the distances of all cells from each other.

    Declaration
    public void CalculateDistances()

    FindHexNeighbors()

    Find the neighbors of each cell in a hexagonal grid.

    Declaration
    public void FindHexNeighbors()

    FindSquaredNeighbors()

    Find the neighbors of each cell in a squared grid.

    Declaration
    public void FindSquaredNeighbors()

    ShowCells(Boolean)

    Show or hide the sprites of the cells.

    Declaration
    public void ShowCells(bool show)
    Parameters
    Type Name Description
    Boolean show

    Show or hide the cells.

    SpawnGridEditor()

    Method used by the custom inspector to create a grid quickly.

    Declaration
    public void SpawnGridEditor()

    UpdateColors()

    Update the colors of the grid

    Declaration
    public void UpdateColors()
    In This Article
    Back to top Auto-Battle Framework documentation