private void Awake() { ps = GetComponentsInChildren <ParticleSystem>(); springyMove = GetComponent <SpringyMove>(); Color color = ColorSchema.GetColor(itemColor); GameObject child = transform.GetChild(0).gameObject; child.GetComponent <Renderer>().material.color = color; }
private void Awake() { int randomNumber = rnd.Next(ColorSchema.standardColors.Length); itemColor = ColorSchema.standardColors[randomNumber]; ps = GetComponentsInChildren <ParticleSystem>(); springyMove = GetComponent <SpringyMove>(); Color color = ColorSchema.GetColor(itemColor); GameObject child = transform.GetChild(0).gameObject; child.GetComponent <Renderer>().material.color = color; }
private void Start() { text = GetComponent <Text>(); springyMove = GetComponent <SpringyMove>(); }
private void Awake() { springyMove = GetComponent <SpringyMove>(); }