Exemplo n.º 1
0
    private void Start()
    {
        // Attach this references in Start() since they are Singletons which instances may be destroyed in Awake()
        //ref_GC_script = FindObjectOfType<Behavior_Game_Controller>();
        ref_NN_script = FindObjectOfType <Behavior_NN>(); //ref_NN.GetComponent<Behavior_NN>();

        ref_NN_script.Init(direction_check_rays, NN_OUTPUTS);

        ref_GC_script.StartRound(ref_NN_script.GetIteration(), ref_NN_script.GetBestFit());

        start_time = Time.time;
    }
Exemplo n.º 2
0
    private void Awake()
    {
        //Debug.Log("NN Awake" + this.GetInstanceID());
        // Creates only one copy of GC, otherwise not destroying on game load would create duplicates
        if (self_NN == null)
        {
            DontDestroyOnLoad(this.gameObject);

            self_NN = this;
        }
        else
        {
            //Debug.Log("NN Awake Destroy");
            Destroy(this.gameObject);
        }
    }