Exemplo n.º 1
0
    private void FinishDamageAction()
    {
        PlaySound(Speech.KAPUTT_GEMACHT);

        //Debug.Log("Robot " + name + " executing damage action!");
        DamagePoint dp = goal.GetComponent <DamagePoint>();

        if (null == dp)
        {
            Debug.LogError("not a ContainerPoint object!");
        }
        dp.Activate();

        BeConfused();
        SetAnimState(AnimState.STUNNED);
    }
Exemplo n.º 2
0
    private void SpawnDamages(int count)
    {
        List <DamagePoint> listDamages = InactiveDamages();

        Debug.Log("inactive damages " + listDamages.Count);

        for (int i = 0; i < count; i++)
        {
            if (listDamages.Count == 0)
            {
                if (localTime > 30.0f)
                {
                    GameOver();
                }
                return;
            }
            int         index = Random.Range(0, listDamages.Count);
            DamagePoint dmg   = listDamages[index];
            dmg.Activate();
            listDamages.Remove(dmg);
            totalDamagesForLevel--;
        }
    }