static public CampActionModel createRest() { CampActionModel result = new CampActionModel(); result.costs.Add(edieIcon.timePass); result.costs.Add(edieIcon.provisions); return(result); }
static public CampActionModel createScout() { CampActionModel result = new CampActionModel(); result.costs.Add(edieIcon.maps); result.costs.Add(edieIcon.boots); return(result); }
static public CampActionModel createReorg() { CampActionModel result = new CampActionModel(); result.costs.Add(edieIcon.minds); result.costs.Add(edieIcon.timePass); return(result); }
static public CampActionModel createPlan() { CampActionModel result = new CampActionModel(); result.costs.Add(edieIcon.minds); result.costs.Add(edieIcon.maps); return(result); }
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); }
static public CampActionModel createHeal() { CampActionModel result = new CampActionModel(); result.costs.Add(edieIcon.cups); result.costs.Add(edieIcon.cups); return(result); }
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); }
// 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++; } }