Exemplo n.º 1
0
    /* Function: UnitEnters
     *
     * Reacts when a unit enters the cell. If more than one unit is present
     * their positions will be offset so that they do not overlap, as long as
     * there are no more than five units in the same cell.
     *
     * Parameters:
     *
     *  unit - The unit currently entering the cell.
     *
     */

    public void UnitEnters(HexUnit unit)
    {
        unitsInCell++;
        Debug.Log("Units in cell count: " + unitsInCell);
        unit.OffsetLocation(unitsInCell);
        units.Add(unit);
    }