Beispiel #1
0
    // place a copy of the currently held value in the specified Card
    // Computron still keeps the held value
    IEnumerator COPY_TO()
    {
        // get card reference
        CurrentArg = current.Arg;
        CardLogic card = cardContainer.GetCard((int)CurrentArg);

        // trying to store null causes a runtime error
        if (CurrentValue == null)
        {
            error        = true;
            currentState = ACTOR_STATE.REPORTING;
            yield return(StartCoroutine(currentState.ToString()));
        }
        else
        {
            // put down a copy of the value held
            card.CopyTo((int)CurrentValue);
            yield return(new WaitForSeconds(InstructionDelay));
        }

        currentState = ACTOR_STATE.REPORTING;
    }