-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSkill.java
More file actions
35 lines (27 loc) · 877 Bytes
/
Copy pathSkill.java
File metadata and controls
35 lines (27 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Authors: Jerry Li & Victor Jiang
* Date: June 13, 2025
* Description: This class defines how a skill works in game with properties like levels, cooldown,
* and instantaneous behaviour in game
*/
import java.awt.Graphics2D;
import java.util.List;
public abstract class Skill {
// Skill ID
protected String id;
// Player that owns the skill
protected Player owner;
//List of different levels for the skill
protected List<SkillLevel> levels;
// Constructor
public Skill(String id, Player owner) {
this.owner = owner;
levels = owner.parent.skill_map.get(id).getLevels();
}
// Updates skill logic
public abstract void update(float dt, List<Enemy> enemies);
// Draw skill on screen
public abstract void draw(Graphics2D g2d);
// Upgrades skill to next level
public abstract void levelUp();
}