Esempio n. 1
0
    protected override void Update()
    {
        base.Update();
        if (!Cow.AllowMonsters())
        {
            return;
        }

        if (_spawnCow)
        {
            return;
        }

        _spawnTime -= Time.deltaTime;
        if (_spawnTime <= 0)
        {
            Monster monster = Monster.Create(transform.position + new Vector3().Random(true) * Cow.RadarRange + Vector3.down * 0.5f);
            monster.Parent = Cow;
            _spawnTime     = SpawnTime;
        }
    }