示例#1
0
    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();
    }
示例#2
0
    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);
        }
    }