<commit_before>﻿using UnityEngine;
using System.Collections;

public class PointGenerator : MonoBehaviour
{

    public GameObject GoodPointsHolder;
    public GameObject BadPointsHolder;

    public GameObject GoodPoint;
    public GameObject BadPoint;

    public int BadPointCount;
    public int GoodPointCount;

    public int ArenaSize;

    // Use this for initialization
    void Start()
    {
        var arenaHalfSize = ArenaSize / 2;
        for (int i = 0; i < GoodPointCount; i++)
        {
            Instantiate(GoodPoint, new Vector3(Random.Range(-arenaHalfSize, arenaHalfSize), Random.Range(-arenaHalfSize, arenaHalfSize)), Quaternion.identity, GoodPointsHolder.transform);
        }

        for (int i = 0; i < BadPointCount; i++)
        {
            Instantiate(BadPoint, new Vector3(Random.Range(-arenaHalfSize, arenaHalfSize), Random.Range(-arenaHalfSize, arenaHalfSize)), Quaternion.identity, BadPointsHolder.transform);
        }
    }

    // Update is called once per frame
    void Update()
    {
    }
}<commit_msg>Odnawianie punktów po zebraniu<commit_after>﻿using UnityEngine;
using System.Collections;
using Events;

public class PointGenerator : MonoBehaviour
{

    public GameObject GoodPointsHolder;
    public GameObject BadPointsHolder;

    public GameObject GoodPoint;
    public GameObject BadPoint;

    public int BadPointCount;
    public int GoodPointCount;

    public int ArenaSize;

    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < GoodPointCount; i++)
        {
            AddGoodPoint();
        }

        for (int i = 0; i < BadPointCount; i++)
        {
            AddBadPoint();
        }
    }

    private void AddBadPoint()
    {
        AddPoint(BadPoint);
    }

    private void AddGoodPoint()
    {
        AddPoint(GoodPoint);
    }

    private void AddPoint(GameObject pointType)
    {
        Instantiate(pointType, GetRandomPosition(), Quaternion.identity, GoodPointsHolder.transform);
    }

    private Vector3 GetRandomPosition()
    {
        var arenaHalfSize = ArenaSize / 2;
        return new Vector3(Random.Range(-arenaHalfSize, arenaHalfSize), Random.Range(-arenaHalfSize, arenaHalfSize));
    }

    // Update is called once per frame
    void Update()
    {
    }


    void OnEnable()
    {
        EventManager.StartListening("GoodPointCollected", AddGoodPoint);
        EventManager.StartListening("BadPointCollected", AddBadPoint);
    }

    void OnDisable()
    {
        EventManager.StopListening("GoodPointCollected", AddGoodPoint);
        EventManager.StopListening("BadPointCollected", AddBadPoint);
    }


}
{'fraction_non_alphanumeric': 0.08901515151515152, 'fraction_numerical': 0.003787878787878788, 'mean_word_length': 2.7407932011331444, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4205558', 'n_tokens_mistral': 777, 'n_tokens_neox': 733, 'n_words': 182}