Beispiel #1
0
    public void ReturnFish(GameObject _returnedFish)
    {
        m_Claimed.Remove(_returnedFish);
        m_Unclaimed.Add(_returnedFish);

        OnFishSpawned?.Invoke(m_Unclaimed.Count, m_Claimed.Count);
    }
Beispiel #2
0
    public void SpawnFish(Vector3 _position)
    {
        if (m_FishPrefab == null)
        {
            return;
        }

        var spawnedFish = Instantiate(m_FishPrefab, _position, Quaternion.Euler(Random.Range(0, 361), Random.Range(0, 361), Random.Range(0, 361)));

        spawnedFish.transform.localScale *= Random.Range(0.5f, 1.5f);

        m_Unclaimed.Add(spawnedFish);
        OnFishSpawned?.Invoke(m_Unclaimed.Count, m_Claimed.Count);
    }