Exemplo n.º 1
0
    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();
    }
Exemplo n.º 2
0
    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();
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
    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);
    }
Exemplo n.º 6
0
 public void setName(ConstEnums.Skills name)
 {
     skillName = name;
 }
Exemplo n.º 7
0
 void Start()
 {
     Debug.Log("base skill start");
     skillName = ConstEnums.Skills.None;
     Enter();
 }
Exemplo n.º 8
0
 public void addSkillToAniml(int animalIdx, ConstEnums.Skills skill, int neededFood)
 {
     animals[animalIdx].GetComponent <AnimalView>().addSkillView(skill, neededFood);
 }
Exemplo n.º 9
0
 public int addSkillToAniml(int animalIdx, ConstEnums.Skills skill)
 {
     return(animalMods[animalIdx].addSkillToProperty(skill));
 }
Exemplo n.º 10
0
 public CardModel(ConstEnums.Skills skill)
 {
     ownerId  = ConstEnums.PlayerId.None;
     cardType = skill;
     index    = -1;
 }