Exemplo n.º 1
0
    private void RepairDone(DamagePoint dp)
    {
        if (carriedItem != null)
        {
            DestroyImmediate(carriedItem.gameObject);
            carriedItem = null;
        }

        Waypoint wp = dp.GetComponent <Waypoint>();

        switch (wp.damage)
        {
        case DamageType.REPAIR_WELD:
            PlaySound(Speech.SCHWEISSGERAET);
            break;

        case DamageType.REPAIR_MECHANIC:
            PlaySound(Speech.WERKZEUG_INSTALLIERT);
            break;

        case DamageType.REPAIR_BATTERY:
            PlaySound(Speech.BATTERIE_INSTALLIERT);
            break;

        case DamageType.REPAIR_BERYLLIUM:
            PlaySound(Speech.BERYLLIUMKUGEL_INSTALLIERT);
            break;

        case DamageType.REPAIR_FLUX:
            PlaySound(Speech.FLUX_COMPENSATOR_INSTALLIERT);
            break;

        default:
        case DamageType.REPAIR_NONE:
            break;
        }

        dp.Deactivate();
        state = RobotState.IDLE;
        goal  = null;
    }
Exemplo n.º 2
0
    void BeConfused()
    {
        //PlaySound(Speech.I_AM_CONFUSED);

        if (carriedItem != null)
        {
            SetAnimState(AnimState.THROW);
            carriedItem.FloatToSpace();
            carriedItem = null;
        }

        DamagePoint p = FindUnusedDamagePoint();

        if (null == p)
        {
            Debug.Log("no more damage points!");
            return;
        }

        Waypoint wp = p.GetComponent <Waypoint>();

        SetTarget(wp, true);
    }