Ejemplo n.º 1
0
    /// <summary>
    /// Puts the correct item in the missing position on the current row automatically.
    /// </summary>
    public IEnumerator PutItem()
    {
        Global.lockMouse = true;
        iTween.MoveTo(this.gameObject,
                      new Vector3(transform.position.x, Constants.SELECT_ITEM_HIGHER_Y, transform.position.z),
                      Constants.SELECT_ITEM_MOVE_TIME);

        yield return(new WaitForSeconds(Constants.SELECT_ITEM_MOVE_TIME));

        iTween.MoveTo(this.gameObject, m_missingItemPosition, Constants.SELECT_ITEM_MOVE_TIME);

        yield return(new WaitForSeconds(Constants.SELECT_ITEM_MOVE_TIME));

        iTween.MoveTo(this.gameObject,
                      new Vector3(transform.position.x, Constants.ITEM_GROUND_LEVEL, transform.position.z),
                      Constants.SELECT_ITEM_MOVE_TIME);

        yield return(new WaitForSeconds(Constants.SELECT_ITEM_MOVE_TIME));

        m_selectItemManager.CreateRowCompleteParticles();

        yield return(new WaitForSeconds(Constants.WAIT_BEFORE_UNCLOCK_MOUSE));

        m_selectItemManager.DestroyParticles();
        m_showReel.Add(this.gameObject);
        m_rowsManager.NextRow();
    }