public void Add(Modifiers.Modifier mod) { modHolders[modsAdded].SetActive(true); ModifierDisplay modDisplay = GetModDisplay(mod); Renderer modRender = modHolders[modsAdded].GetComponent <Renderer>(); modRender.material.mainTexture = modDisplay.icon; modsAdded++; }
public virtual void Initialize(Item item, Inventory inventory) { defaultColor = selectable.GetComponent <Image>().color; modifierDisplay = FindObjectOfType <ModifierDisplay>(); this.item = item; this.inventory = inventory; SetIcon(item); SetText(item); }
void DisplayChoices(Selection selection) { Debug.Log(">>> " + selection.selectionMode.ToString()); SelectionSet selectionSet = GetSelectionSet(selection); selectionSet.gameObject.SetActive(true); int choiceID = 0; foreach (Modifiers.Modifier mod in selection.mods) { ModifierDisplay modDisplay = GetModDisplay(mod); selectionSet.SetupChoice(mod, modDisplay, choiceID); choiceID++; } }
void Awake() { cameraDistance = Camera.main.transform.position.y; //distance from camera to plane modifierCombo = new ModifierCombo (); modifierDisplay = GetComponent<ModifierDisplay> (); }