private void Awake() { avaliableMoves = new List <Vector2Int>(); tweener = GetComponent <IObjectTweener>(); materialSetter = GetComponent <MaterialSetter>(); hasMoved = false; }
public void SetMaterial(Material material) { if (materialSetter == null) { materialSetter = GetComponent <MaterialSetter>(); } materialSetter.SetSingleMaterial(material); }
private void Awake() { availableMoves = new List <Vector2Int>(); tweener = GetComponent <IObjectTweener>(); materialSetter = GetComponent <MaterialSetter>(); audioOutput = GetComponent <AudioOutputController>(); hasMoved = false; }
void SetCurrentPrefab() { currentTree = ObjectChanger.SetCurrentPrefab(trees, currentTree, transform, out treeProperties.currentMonthStart); currentTree.transform.parent = parent; MaterialSetter materialSetter = currentTree.GetComponent <MaterialSetter> (); if (materialSetter != null) { materialSetter.SetTreePropertyValues(treeProperties); } }
private void Awake() { motor = GetComponent <Motor>(); materialSetter = GetComponent <MaterialSetter>(); hitEffect = GetComponent <IHitable>(); }