Exemple #1
0
 protected override void DisplayInGrid(State currentState, TilemapComponent tilemap)
 {
     if (skillToActivate is SelectTilesSkill)
     {
         TilemapComponent.ClearHighlightFromGrid(tilemap.grid, Tile.HighlightTypes.Attack);
         TilemapComponent.ClearHighlightFromGrid(tilemap.grid, Tile.HighlightTypes.Move);
         TilemapComponent.RefreshGridHighlights(tilemap.grid, skillRange, Tile.HighlightTypes.Skill);
     }
 }
Exemple #2
0
    protected override void DisplayInGrid(State currentState, TilemapComponent tilemap)
    {
        var stateData = (AllySelectedState)currentState;

        TilemapComponent.ClearHighlightFromGrid(tilemap.grid, Tile.HighlightTypes.SelectedEntity);
        source.tile.HighlightAs(Tile.HighlightTypes.SelectedEntity);

        stateData.attackRange = TilemapComponent.GenerateAttackRange(tilemap.grid, source);
        stateData.moveRange   = TilemapComponent.GenerateMoveRange(tilemap.grid, source);

        TilemapComponent.RefreshGridHighlights(tilemap.grid, stateData.attackRange, Tile.HighlightTypes.Attack);
        TilemapComponent.RefreshGridHighlights(tilemap.grid, stateData.moveRange, Tile.HighlightTypes.Move);
    }
Exemple #3
0
    protected override void Execute(State currentState, TilemapComponent tilemap)
    {
        if (skillToDeactivate is AttackSkill)
        {
            source.currentAttackSkill = null;
            //dialog.PostToDialog("Activated " + skillToActivate.GetType().Name, dialogNoise, false);
        }
        else if (skillToDeactivate is SelectTilesSkill)
        {
            var stateData = (AllySelectedState)currentState;

            TilemapComponent.ClearHighlightFromGrid(tilemap.grid, Tile.HighlightTypes.Skill);
            stateData.attackRange = TilemapComponent.GenerateAttackRange(tilemap.grid, source);
            stateData.moveRange   = TilemapComponent.GenerateMoveRange(tilemap.grid, source);
            TilemapComponent.RefreshGridHighlights(tilemap.grid, stateData.attackRange, Tile.HighlightTypes.Attack);
            TilemapComponent.RefreshGridHighlights(tilemap.grid, stateData.moveRange, Tile.HighlightTypes.Move);
        }
        else if (skillToDeactivate is BuffSkill)
        {
            // do nothing for now
        }
    }