示例#1
0
    public void init(Contaminant c)
    {
        progressBar.GetComponent <Image>().fillAmount = (float)c.qtd / c.qtdMax;
        percentageContaminant = (float)c.qtd / c.qtdMax;
        positionInitialX      = 1.744f;

        valueScale          = 0.5f;
        xPositionScale      = 0.17f * 5;
        sumInnerX           = 1.282f;
        xPosition           = transform.position.x;
        countPoint          = 0;
        progressing         = false;
        listDaysTable       = new int[] { 5, 10, 15, 20 };
        dictPoints          = new Dictionary <int, GameObject>();
        manageLanguagePhase = FindObjectOfType <ManageLanguagePhase>();

        velocityMove       = 2f;
        originalScalePoint = prefrabPoint.transform.localScale.x;
        parameters         = new Parameters();

        updateRadialProgressBar(percentageContaminant, c);
        heightQuadGraph = modulo((quadGraph.bounds.max.y) - (quadGraph.bounds.min.y));
        minQuadGraph    = (quadGraph.bounds.min.y);
        insertPoint(c);
    }
    private void Awake()
    {
        listGraph           = GraphAbundanceScript.listGraph;
        manageLanguagePhase = FindObjectOfType <ManageLanguagePhase>();

        GraphAbundanceScript graph = FindObjectOfType <GraphAbundanceScript>();

        graph.setText();
        colorPos  = 4;
        isLoaded  = false;
        colorList = new List <Color>()
        {
            new Color(219 / 255f, 77 / 255f, 77 / 255f, 1f),
            new Color(57 / 255f, 163 / 255f, 64 / 255f, 1f),
            new Color(222 / 255f, 180 / 255f, 67 / 255f, 1f),
            new Color(106 / 255f, 73 / 255f, 214 / 255f, 1f),
            new Color(56 / 255f, 145 / 255f, 209 / 255f, 1f),
        };
        setColors();

        GameObject temp = text;

        temp.transform.localScale = new Vector3(1f / 32.08213f, 1f / 47.31878f, 1f);
        text = temp;
    }
示例#3
0
    void Awake()
    {
        listBacterias  = Bacteria.getClone(ScenesManager.bacterias);
        contaminant    = ScenesManager.contaminant.getClone();
        variables      = ScenesManager.variables.getClone();
        objectiveValue = ScenesManager.objectiveValue;

        parameters          = new Parameters();
        log                 = new LogEvent();
        manageLanguagePhase = FindObjectOfType <ManageLanguagePhase>();
        taxa                = parameters.taxa;
        scorePercentageLost = parameters.scorePercentageLost;
        numDaysEffect       = parameters.numDaysEffect;
        numberDayCicles     = parameters.numberDayCicles;
        timeDay             = parameters.timeDay;

        scoreLoss10days = parameters.scoreLoss10days;
        costAtenuation  = parameters.costAtenuation;
        costBioest      = parameters.costBioest;
        costBioaum      = parameters.costBioaum;


        valueAtenuation = parameters.valueAtenuation;
        valueBioest     = parameters.valueBioest;
        valueBioaum     = parameters.valueBioaum;

        day              = 1;
        score            = 300;
        previousScore    = score;
        actionEffect     = Action.None;
        absRateNutrient  = 1;
        globalEnviroment = -2;

        scorePrevious       = score;
        contaminantPrevious = contaminant.percentage;
        valuePrevious       = contaminant.qtd;
        degRate             = new float[5];
        dataDegradeted      = new List <float>();

        for (int i = 0; i < 5; i++)
        {
            degRate[i] = listBacterias[i].degRate;
        }
    }