public MissionsController(MissionsManager missionsManager, UsersManager usersManager, IServiceProvider serviceProvider /*,NotifyHub notifyHub*/, IUserNotify userNotify) { this.MissionsManager = missionsManager; this.UsersManager = usersManager; this.ServiceProvider = serviceProvider; //this.NotifyHub = notifyHub; this.UserNotify = userNotify; }
// Use this for initialization void Start() { missionManager = FindObjectOfType <MissionsManager>(); randObject = Random.Range(0, 5); texts[randObject].SetActive(true); images[randObject].SetActive(true); }
private PlayerController player; //Associa o "PlayerCOntroller" ao controlador de jogo //Usado apenas na inicialização void Start() { missionsManager = FindObjectOfType <MissionsManager>(); //Procura na cena um objeto com as características do "MissionsManager" player = FindObjectOfType <PlayerController>(); //Procura na cena um objeto com as características do "PlayerController" startTime = Time.time; //Determina o tempo inicial Cursor.visible = false; //Faz o cursor do mouse desaparecer da tela }
private void Awake() { if (!mInstance) { mInstance = this; } else { Destroy(this.gameObject); return; } areasManager = GetComponent <AreasManager>(); DontDestroyOnLoad(this); }
//default initialization of Singleton instance void Awake() { //Check if instance already exists if (i == null) { //if not, set instance to this i = this; } //If instance already exists and it's not this: else if (i != this) { //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of it. //Sets this to not be destroyed when reloading scene DontDestroyOnLoad(gameObject); } }
private void Start() { _missionsManager = MissionsManager.Instance; _missionsManager.RegisterCallback(NotificationType.OnMissionToStart, () => { _animator.SetBool("IsMissionToStart", true); }); _missionsManager.RegisterCallback(NotificationType.OnMissionStarted, () => { _animator.SetBool("IsMissionToStart", false); }); _missionsManager.RegisterCallback(NotificationType.OnMissionObjectivesReached, () => { print("Mission objectives reached"); _animator.SetBool("IsMissionCompleted", true); }); _missionsManager.RegisterCallback(NotificationType.OnMissionCompleted, () => { _animator.SetBool("IsMissionCompleted", false); }); _animator.SetBool("IsMissionToStart", true); }
void Awake() { if (!mInstance) mInstance = this; //otherwise, if we do, kill this thing else { Destroy(this.gameObject); return; } DontDestroyOnLoad(this); missionsManager = GetComponent<MissionsManager>(); texts = GetComponent<Texts>(); settings = GetComponent<Settings>(); userData = GetComponent<UserData>(); clothesSettings = GetComponent<ClothesSettings>(); savedSettings = GetComponent<SavedSettings>(); }
private MainMenuController mainMenuController; //Associa o menu principal ao botão de level // Usado apenas na Inicialização void Start() { missionsManager = FindObjectOfType <MissionsManager>(); //Procura na cena um objeto com as caracteristicas do controlador de missão mainMenuController = FindObjectOfType <MainMenuController>(); //Procura na cena um objeto com as caracteristicas do menu principal isUnlocked = ApplicationController.isUnlocked(levelToGo); //Determina se o level está desbloqueado isUnlockedStar = ApplicationController.isUnlockedStar(currentStar); //Determina se a estrela está desbloqueada if (isUnlockedStar && !isLevelPassed) //Caso a estrela esteja desbloqueada e o level ja não tenha sido concluido { star.SetActive(true); // O objeto da estrela é ativado ApplicationController.SetCurrentStar(currentStar); //Determina A quantidade atual de estrelas mainMenuController.currentStars++; //Aumenta em 1 a quantidade de estrelas atual isLevelPassed = true; //Determina que o level foi concluido } else //Caso isso não aconteça { star.SetActive(false); // A estrela não é ativada isLevelPassed = false; //Detemrina que o level não foi concluido } if (isUnlocked || levelToGo == 1) //Caso o level esteja desbloqueado ou seja o level 1 { boxUnlocked.SetActive(true); //O objeto de caixa desbloqueada é ativado boxLocked.SetActive(false); //O objeto de caixa bloqueada é desativado } else //Caso isso não aconteça { boxUnlocked.SetActive(false); //O objeto de caixa desbloqueada é desativado boxLocked.SetActive(true); //O objeto de caixa bloqueada é ativado } levelNumber.text = levelToGo.ToString(); //O texto do numero do level recebe o numero do level que deve carregar }
protected MissionValidator(T mission, User user, ObservationsManager observationsManager, MissionsManager missionsManager, UsersManager usersManager) { this.User = user; this.Mission = mission; this.ObservationsManager = observationsManager; this.MissionsManager = missionsManager; this.UsersManager = usersManager; }
private void Awake() { instance = this; }
public VerifyMissionValidator(VerificationMission mission, User user, ObservationsManager observationsManager, MissionsManager missionsManager, UsersManager usersManager) : base(mission, user, observationsManager, missionsManager, usersManager) { }
private MissionsManager missionsManager; //Associa o "MissionsManager" ao personagem //Usado apenas na inicialização void Start() { missionsManager = FindObjectOfType <MissionsManager>(); //Procura na cena um objeto com as características do "MissionsManager" gameManager = FindObjectOfType <GameplayManager>(); //Procura na cena um objeto com as características do "GameManager" }
public NewObservationMissionValidator(NewObservationMission mission, User user, ObservationsManager observationsManager, MissionsManager missionsManager, UsersManager usersManager) : base(mission, user, observationsManager, missionsManager, usersManager) { }
void Awake() { MissionsM = this; }