Esempio n. 1
0
    static public CampActionModel createRest()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.timePass);
        result.costs.Add(edieIcon.provisions);
        return(result);
    }
Esempio n. 2
0
    static public CampActionModel createScout()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.maps);
        result.costs.Add(edieIcon.boots);
        return(result);
    }
Esempio n. 3
0
    static public CampActionModel createReorg()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.minds);
        result.costs.Add(edieIcon.timePass);
        return(result);
    }
Esempio n. 4
0
    static public CampActionModel createPlan()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.minds);
        result.costs.Add(edieIcon.maps);
        return(result);
    }
Esempio n. 5
0
    static public CampActionModel createReagents()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.cups);
        result.costs.Add(edieIcon.wands);
        result.costs.Add(edieIcon.maps);
        return(result);
    }
Esempio n. 6
0
    static public CampActionModel createHeal()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.cups);
        result.costs.Add(edieIcon.cups);

        return(result);
    }
Esempio n. 7
0
    static public CampActionModel createForage()
    {
        CampActionModel result = new CampActionModel();

        result.costs.Add(edieIcon.cups);
        result.costs.Add(edieIcon.maps);
        result.costs.Add(edieIcon.blades);

        return(result);
    }
Esempio n. 8
0
    // Use this for initialization
    void Start()
    {
        // associate references
        actionIcon = this.transform.FindChild("ActionIcon").gameObject;
        costGameObjects.Add(this.transform.FindChild("Cost1").gameObject);
        costGameObjects.Add(this.transform.FindChild("Cost2").gameObject);
        costGameObjects.Add(this.transform.FindChild("Cost3").gameObject);

        model = CampActionFactory.createActionNamed(ActionName);

        SpriteRenderer renderer = actionIcon.GetComponent <SpriteRenderer> ();
        // set up the action image
        string iconName = String.Format("Sprites/UIElements/camp{0}", ActionName);

        renderer.sprite = Resources.Load(iconName, typeof(Sprite)) as Sprite;

        Debug.Log(iconName);

        // set up the icons for costs
        int index = 0;

        foreach (GameObject dobject in costGameObjects)
        {
            Debug.Log("sheepish");

            // we'll need to convert the die icon into a filename :(
            SpriteRenderer icoRenderer = dobject.GetComponent <SpriteRenderer>();
            bool           enabled     = false;

            if (index < model.costs.Count)
            {
                enabled            = true;
                icoRenderer.sprite = Resources.Load(DieIconStringNames.getFilename((edieIcon)model.costs[index]), typeof(Sprite)) as Sprite;

                Debug.Log(DieIconStringNames.getFilename((edieIcon)model.costs[index]));
            }

            icoRenderer.enabled = enabled;
            index++;
        }
    }