Skill Logic
Implemented basic UI for skills to player
This commit is contained in:
51
3D blobici/Assets/Scripts/Player/PlayerSkillTree.cs
Normal file
51
3D blobici/Assets/Scripts/Player/PlayerSkillTree.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class PlayerSkillTree
|
||||
{
|
||||
|
||||
private static PlayerSkillTree _instance;
|
||||
|
||||
public static PlayerSkillTree Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new PlayerSkillTree();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum Skills
|
||||
{
|
||||
Dash,
|
||||
Rush,
|
||||
Kek,
|
||||
LMAO
|
||||
}
|
||||
|
||||
private List<Skills> playerSkills;
|
||||
|
||||
public PlayerSkillTree()
|
||||
{
|
||||
playerSkills = new List<Skills>();
|
||||
}
|
||||
|
||||
public void UnlockSkill(Skills skill)
|
||||
{
|
||||
playerSkills.Add(skill);
|
||||
}
|
||||
|
||||
public bool IsSkillUnlocked(Skills skill)
|
||||
{
|
||||
return playerSkills.Contains(skill);
|
||||
}
|
||||
|
||||
public List<Skills> GetPlayerSkills() { return playerSkills; }
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user