Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        position = transform.position;
        s        = transform.localScale;
        xmax     = position.x + s.x / 2.0f;
        xmin     = position.x - s.x / 2.0f;
        ymax     = position.y + s.y / 2.0f;
        ymin     = position.y - s.y / 2.0f;
        origin   = (Vector2)(transform.position - transform.localScale / 2.0f);

        isCollecting = false;
        isTimeout    = false;
        isBuilt      = false;

        SBM = GetComponentInParent <SketchBoxesManagement>();

        maxTimeout = SBM.timeout;
        timeout    = maxTimeout;

        Strokes = new List <List <Vector2> >
        {
            new List <Vector2>()
        };
        Lines = new List <GameObject>
        {
            Instantiate(line, Vector3.zero, Quaternion.identity, transform)
        };
        lineRenderer     = Lines[currentIndex].GetComponent <LineRenderer>();
        candidate_points = new List <Point>();

        border = transform.Find("Border").gameObject;
    }
    // Start is called before the first frame update
    void Start()
    {
        //gold = InitialGold;
        lives                 = MaxLives;
        PlayerHealth          = GameObject.Find("/Grid/Canvas/Health_Blood").GetComponent <PlayerHealthBar>();
        PlayerHealth.maxLives = MaxLives;
        PlayerHealth.lives    = lives;

        remainingEnemies = GetComponent <EnemyGenerator>().Waves.Sum(w => w.Amount);

        SBM = GameObject.Find("GameManagement").GetComponent <SketchBoxesManagement>();

        //EvalPanel = GameObject.Find("Evaluation");


        //VictoryText = GameObject.Find("/Evaluation/Victory");
        //GameOverText = GameObject.Find("/Evaluation/GameOver");
        //Debug.Log(GameObject.Find("/Evaluation/Canvas/TotalScores"));
        totalScore = GameObject.Find("/Evaluation/Canvas/TotalScores/Scores").GetComponent <Score>();
        simScore   = GameObject.Find("/Evaluation/Canvas/Similarity/Scores").GetComponent <Score>();
        speedScore = GameObject.Find("/Evaluation/Canvas/Speed/Scores").GetComponent <Score>();
        EvalPanel.SetActive(false);
    }
Example #3
0
 void Start()
 {
     SBM = GameObject.Find("GameManagement").GetComponent <SketchBoxesManagement>();
 }