public void SetGame() { // Update player state state = PlayerStates.GAME; rb.isKinematic = false; for (int i = 0; i < colls.Length; i++) { colls[i].enabled = true; } trail.Clear(); trail.enabled = true; // Play bloom trail scale animation scaleObject.Play(); }
public void Initialize(Vector3 position) { // Enable coin game object and initialize active states transform.position = position; transform.localScale = Vector3.zero; coll.enabled = true; visualObject.SetActive(true); explosionObject.SetActive(false); gameObject.SetActive(true); scaleObject.Play(); coinSource.Play(); // Invoke explode method if duration is not unlimited for bonus coins if (duration > 0f) { Invoke("Explode", duration); } }