public void AssessPerformance() { _enemyController = GameObject.FindGameObjectWithTag("Enemy").GetComponent <EnemyController>(); _objController = GetComponent <ObjectivesController>(); _solvedAnimals = GameObject.FindGameObjectsWithTag("SolvedAnimal"); _lostAnimals = GameObject.FindGameObjectsWithTag("LostAnimal"); CheckLists(_solvedAnimals, _objController.listSolvedObjs, false); //for (int i = 0; i < _solvedAnimals.Length; i++) //{ // if (i < _objController.listSolvedObjs.Count && !_objController.listSolvedObjs[i].isAssessed) // { // ChangeSpriteInfo(_solvedAnimals[i], _objController.listSolvedObjs[i]); // } // else if (i >= _objController.listSolvedObjs.Count) // { // _solvedAnimals[i].SetActive(false); // } //} CheckLists(_lostAnimals, _objController.listLostObjs, true); //for (int i = 0; i < _lostAnimals.Length; i++) //{ // if (i < _objController.listLostObjs.Count && !_objController.listLostObjs[i].isAssessed) // { // ChangeSpriteInfo(_lostAnimals[i], _objController.listLostObjs[i]); // } // else if (i >= _objController.listLostObjs.Count) // { // _lostAnimals[i].SetActive(false); // } //} }
public void Initialize() { var options = new DbContextOptionsBuilder <LibraryContext>() .UseSqlite("DataSource=C:/Users/denny/Desktop/Cloud Applications/Test_New_Objective_API_Layers_v2/test_db") .Options; using (var context = new LibraryContext(options)) { context.Database.OpenConnection(); context.Database.EnsureCreated(); context.Objectives.Add(new Objective() { Id = 1, Description = "test objective 1" }); context.Labels.Add(new Label() { Id = 1, Feature = "test label 1" }); } _facade_obj = new ObjectiveFacade(new LibraryContext(options)); _controller_obj = new ObjectivesController(_facade_obj); _facade_lbl = new LabelFacade(new LibraryContext(options)); _controller_lbl = new LabelsController(_facade_lbl); }
private void Start() { startingPos = transform.position; startingRot = transform.rotation.eulerAngles; gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); objController = GameObject.FindGameObjectWithTag("ObjectivesController").GetComponent <ObjectivesController>(); enemySpr = GetComponentInChildren <SpriteRenderer>(); enemyColl = GetComponent <CircleCollider2D>(); enemyAnim = GetComponent <Animator>(); }
private void Start() { col = GetComponent <Collider2D>(); spr = GetComponent <SpriteRenderer>(); objController = GetComponentInParent <ObjectivesController>(); enemy = GameObject.FindGameObjectWithTag("Enemy").GetComponent <EnemyController>(); if (FindObjIndex(this) < objController.objectives.Length - 1) { nextObj = objController.objectives[FindObjIndex(this) + 1].gameObject; } else { nextObj = objController.objectives[0].gameObject; } }
private void Start() { _objectivesController = GameObject.FindGameObjectWithTag("ObjectivesController").GetComponent <ObjectivesController>(); }