Пример #1
0
    bool[] reachedMarker; //if a particular marker has been reached, true. Same order and size as goalmarkers

    // Use this for initialization
    void Start()
    {
        rb         = GetComponent <Rigidbody2D>();
        rand       = new System.Random(Guid.NewGuid().GetHashCode());
        initialPos = transform.position;


        ec = GameObject.Find("EvolutionController").GetComponent <EvolutionController>();

        //initialize square with ec data

        maxSteps     = ec.GetCurrMaxSteps();
        mutationRate = ec.GetMutationRate();

        currStep  = 0;
        currDelay = 0;

        //get initial list of movements
        //if not a square loaded from disk
        if (!loadedSquare)
        {
            InitializeMovements();
        }
    }