예제 #1
0
파일: Car.cs 프로젝트: DOG007ua/CarNeirone
 void Start()
 {
     colorRay[0]   = new Color(255, 0, 0);
     colorRay[1]   = new Color(0, 255, 0);
     colorRay[2]   = new Color(0, 0, 255);
     speed         = minSpeed;
     neironNetWork = new NeironNetWork();
     SetLigth();
     //SetRandomColor();
 }
예제 #2
0
파일: Car.cs 프로젝트: DOG007ua/CarNeirone
 public DrawNeiron(NeironNetWork neironNetWork, float maxDistanceRay)
 {
     this.neironNetWork = neironNetWork;
     amountLayer        = neironNetWork.AmountNeironInLayer.Length;
     stepX = width / amountLayer;
     this.maxDistanceRay = maxDistanceRay;
     outValuePosition    = new Vector2[neironNetWork.AmountNeironInLayer[neironNetWork.AmountNeironInLayer.Length - 1]];
     CalculationPositionNeiron();
     InicializatioMassColorNeiron();
     SetMassColorNeironWeigth();
 }
예제 #3
0
파일: Car.cs 프로젝트: DOG007ua/CarNeirone
 public void NewGeneration(NeironNetWork massNeironNew)
 {
     neironNetWork = massNeironNew;
     distance      = 0;
     numberLap     = 0;
     crash         = false;
     gameObject.GetComponent <BoxCollider>().enabled = true;
     drawNeiron?.SetNeironNetWork(neironNetWork);
     drawNeiron?.SetMassColorNeironWeigth();
     //coefSpeedGame = 1;
 }
예제 #4
0
    public object Clone()
    {
        NeironNetWork netWork = new NeironNetWork();

        for (int i = 0; i < massNeiron.Length; i++)
        {
            for (int j = 0; j < massNeiron[i].Length; j++)
            {
                netWork.massNeiron[i][j].weight = massNeiron[i][j].weight;
            }
        }
        return(netWork);
    }
예제 #5
0
    int IComparable.CompareTo(object o)
    {
        NeironNetWork temp = (NeironNetWork)o;

        if (this.AbsError > temp.AbsError)
        {
            return(1);
        }
        if (this.AbsError < temp.AbsError)
        {
            return(-1);
        }
        else
        {
            return(0);
        }
    }
예제 #6
0
파일: Car.cs 프로젝트: DOG007ua/CarNeirone
 public void SetNeironNetWork(NeironNetWork neironNetWork)
 {
     this.neironNetWork = neironNetWork;
 }