public void addSkillView(ConstEnums.Skills skillType, int neededFood) { //GameObject skillObj = Instantiate(skillPrefbs[skillIdx]); //skillObjs.Add(skillObj); //skillObj.transform.parent=transform; //float z = -1f + skillObjs.Count*0.4f; //skillObj.transform.localPosition = new Vector3(0f,1.1f,z); switch (skillType) { case ConstEnums.Skills.Fat: setColor(Color.yellow); break; case ConstEnums.Skills.Predator: setColor(Color.red); break; case ConstEnums.Skills.Hide: setColor(Color.gray); break; case ConstEnums.Skills.Aquatic: setColor(Color.blue); break; case ConstEnums.Skills.Wisdom: setColor(Color.cyan); break; } ; skillText.text += "<" + skillType.ToString().Substring(0, 3) + ">"; setFoodTextHuntMode(); }
public void initCardToMainCard(int skillIdx) { ConstEnums.Skills skillType = (ConstEnums.Skills)skillIdx; Debug.LogWarning("on init main card " + skillType); CardModel card = gameMod.initCards(skillType); gameView.initCard(card); refreshCaedNumTxt(); }
public CardModel initCards(ConstEnums.Skills cardType) { CardModel card = new CardModel(cardType); mainCardMods.Add(card); Debug.LogWarning("main card add card " + cardType); Debug.LogWarning("main card count " + mainCardMods.Count); return(card); }
public bool getSkill(ConstEnums.Skills name) { foreach (base_skill skill in skills) { //Debug.Log ("*******"+skill.getName ()); if (skill.getName() == name) { Debug.Log(name + " exist!"); return(true); } } return(false); }
public int addSkillToProperty(ConstEnums.Skills skillType) { switch (skillType) { case ConstEnums.Skills.Fat: property.addProperty(new skill_fat(this)); break; case ConstEnums.Skills.Predator: property.addProperty(new skill_predator(this)); break; case ConstEnums.Skills.Aquatic: property.addProperty(new skill_aquatic(this)); break; case ConstEnums.Skills.Hide: property.addProperty(new skill_hide(this)); break; case ConstEnums.Skills.FastRun: property.addProperty(new skill_fastRun(this)); break; case ConstEnums.Skills.Vampire: property.addProperty(new skill_vampire(this)); break; case ConstEnums.Skills.Flee: property.addProperty(new skill_flee(this)); break; case ConstEnums.Skills.SharpEye: property.addProperty(new skill_sharpEye(this)); break; case ConstEnums.Skills.Wisdom: property.addProperty(new skill_wisdom(this)); break; default: break; } return(neededFood); }
public void setName(ConstEnums.Skills name) { skillName = name; }
void Start() { Debug.Log("base skill start"); skillName = ConstEnums.Skills.None; Enter(); }
public void addSkillToAniml(int animalIdx, ConstEnums.Skills skill, int neededFood) { animals[animalIdx].GetComponent <AnimalView>().addSkillView(skill, neededFood); }
public int addSkillToAniml(int animalIdx, ConstEnums.Skills skill) { return(animalMods[animalIdx].addSkillToProperty(skill)); }
public CardModel(ConstEnums.Skills skill) { ownerId = ConstEnums.PlayerId.None; cardType = skill; index = -1; }