public void update(Map_Object unit) { base.update(); if (Status_Timer == 0 && Statuses.Count > 1) { Status_Index = (Status_Index + 1) % Statuses.Count; } if (unit != null && unit is Game_Unit) { Hp_Gauge.update(unit as Game_Unit); if (Animation != null) { update_animation(unit as Game_Unit); } else if (!Hold_Animation) { (unit as Game_Unit).update_sprite_frame(this); } } else { if (Animation != null) { update_animation(null); } else if (!Hold_Animation) { Map_Object.UpdateSpriteIdleFrame(this); } } }
protected override void cursor_move_to(Map_Object target) { base.cursor_move_to(target); if (Manual_Targeting) { return; } // Skills: Swoop if (get_unit().swoop_activated) { // Redraw current attack range under targeted units Global.game_temp.temp_skill_ranges["SWOOP"] = get_unit().swoop_range(); } // Skills: Old Swoop else if (get_unit().old_swoop_activated) { // Redraw current attack range under targeted units Global.game_temp.temp_skill_ranges["OLDSWOOP"] = get_unit().old_swoop_range(get_unit().facing); } else if (get_unit().trample_activated) { // Redraw current attack range under targeted units Global.game_temp.temp_skill_ranges["TRAMPLE"] = get_unit().trample_range(get_unit().facing); Global.game_temp.temp_skill_move_ranges["TRAMPLE"] = get_unit().trample_move_range(get_unit().facing); } }
protected virtual void cursor_move_to(Map_Object target) { if (Manual_Targeting) { return; } Vector2 loc = target.loc_on_map(); cursor_move_to(loc); }
private Unit_Passable tile_unit_passability(Game_Unit unit, Vector2 loc, Map_Object unit_here) { if (unit.is_passable_team(unit_here)) { return(Unit_Passable.PassableAlly); } else { if (FullMoveThroughEnemies) { return(Unit_Passable.PassableFullMoveEnemy); } else if (unit.can_pass_enemies()) { return(Unit_Passable.PassableAlly); } if (IgnoreUnits) { return(Unit_Passable.PassableEnemy); } return(Unit_Passable.Blocked); } }