예제 #1
0
	public LGskill(LGskillData.SkillStruct newSkill) {
		if (LGskillData.Skills.ContainsKey ((uint)newSkill.skillID)) {
			Debug.LogError ("SkillID already used, use unique skillIDs");
			return;
		}
		_skillID = (uint)newSkill.skillID;
		_name = newSkill.skillName;
		_effect = (LGskillData.EffectType)newSkill.effect;
		_target = (LGskillData.TargetType)newSkill.target;
		_team = (LGskillData.TeamType)newSkill.team;
		_effortCost = newSkill.effortCost;
		_sourceTrait = (LGstatData.TraitType)newSkill.sourceTrait;
		_targetTrait = (LGstatData.TraitType)newSkill.targetTrait;
		LGskillData.Skills.Add (_skillID,this);
	}
예제 #2
0
	// Constructor
	public LGskill(uint skillID, string newName, int effortCost, LGskillData.EffectType effect, LGstatData.TraitType sourceT,
		LGstatData.TraitType targetT, LGskillData.TargetType target, LGskillData.TeamType team) {
		// For now generate skillID in order, in future skillID should 
		// be powered by config files
		if (LGskillData.Skills.ContainsKey (skillID)) {
			Debug.LogError ("SkillID already used, use unique skillIDs");
			return;
		}
		_skillID = skillID;
		_name = newName;
		_effect = effect;
		_target = target;
		_team = team;
		_effortCost = effortCost;
		_sourceTrait = sourceT;
		_targetTrait = targetT;
		LGskillData.Skills.Add (_skillID,this);
	}