38 lines
870 B
C#
38 lines
870 B
C#
using System.Collections.Generic;
|
|
|
|
public class CommandSkillManager
|
|
{
|
|
public static readonly int COMMAND_SKILL_COUNT = 3;
|
|
public static readonly int NONE_ID = 0;
|
|
|
|
private readonly List<int> _commandSkillIDs = new List<int> { NONE_ID, NONE_ID, NONE_ID };
|
|
public List<int> CommandSkillIDs => _commandSkillIDs;
|
|
|
|
public CommandSkillManager(int id0 = 0, int id1 = 0, int id2 = 0)
|
|
{
|
|
if (id0 > NONE_ID)
|
|
{
|
|
_commandSkillIDs[0] = id0;
|
|
}
|
|
|
|
if (id1 > NONE_ID)
|
|
{
|
|
_commandSkillIDs[1] = id1;
|
|
}
|
|
|
|
if (id2 > NONE_ID)
|
|
{
|
|
_commandSkillIDs[2] = id2;
|
|
}
|
|
}
|
|
|
|
public int GetCommandSkillID(int idx)
|
|
{
|
|
return _commandSkillIDs[idx];
|
|
}
|
|
|
|
public void SetSkillID(int id, int idx)
|
|
{
|
|
_commandSkillIDs[idx] = id;
|
|
}
|
|
} |