void Awake () { if (GameObject.Find ("Player") == null) Debug.LogError ("There is no Gamobject named Player in the scene"); else if (GameObject.Find ("Player") != null) { QuestManager = GameObject.Find ("Player").GetComponent<QuestManager> (); } actor = gameObject.GetComponent<Actor> (); dialogueCanvas = GameObject.Find ("DialogueCanvas").GetComponent<Canvas> (); canvasText = GameObject.Find ("DialogueText").GetComponent<Text> (); dialogueButtonParent = GameObject.Find ("DialogueButtons"); dialogueButtons [0] = GameObject.Find ("Button_Yes").GetComponent<Button> (); dialogueButtons [1] = GameObject.Find ("Button_No").GetComponent<Button> (); //delegates the function of the active dialogue to the two buttons dialogueButtons [0].GetComponent<Button> ().onClick.AddListener (delegate { OnAnswerYes (); }); dialogueButtons [1].GetComponent<Button> ().onClick.AddListener (delegate { OnAnswerNo (); }); dialogueButtonParent.SetActive (false); dialogueCanvas.gameObject.SetActive (false); }
// Use this for initialization void Start() { DialogueList = FindObjectOfType<DialogueDataBase>(); DialogueTemp = GameObject.FindGameObjectWithTag("Item Database").GetComponent<DialogueGenerator>(); QuestGenerate = GameObject.FindGameObjectWithTag("Item Database").GetComponent<QuestManager>(); Talk = FindObjectOfType<TextTyper>(); //find The chatBubble // need to create one if it doesnt exit /* int t = 0; foreach (Text child in TextContainer.transform) { Debug.Log(child); ChatLine2[t] = child; t++; }*/ //ChatLine = GameObject.FindGameObjectsWithTag("ChatText"); //LineLength = ChatLine[0].GetComponent<Text>().text.Length; //ItemList = GameObject.FindGameObjectWithTag ("Item Database").GetComponent<ItemDatabase> (); //disableChatBubble(); TestString = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; }
// Use this for initialization void Start() { villagerSprite = Resources.LoadAll<Sprite>("Villager"); questManger = FindObjectOfType<QuestManager>(); AmmountOfNPC = questManger.AmmountOfQuests; NPC_List = new GameObject[AmmountOfNPC]; }
public PortalViewModel(KanColleClient client) { questManager = new QuestManager(client); questManager .QuestsEventChanged += (sender, e) => { var newQC = new ObservableCollection<QuestProcessCollectionItem>(); questManager .TrackingProcessStrings .ToList() .ForEach(qpc => { newQC.Add(new QuestProcessCollectionItem { Id = qpc.Id, WikiIndex = qpc.WikiIndex, Name = qpc.Name, ProcessPercent = qpc.ProcessPercent, ProcessText = qpc.ProcessText }); }); QuestProcessCollection = newQC; }; }
IEnumerator Present(QuestManager quests) { uiContent.SetActive(quests.Any()); uiBackground.SetActive(uiContent.activeSelf); uiContent.transform.DestroyAllChildren(); if (quests.Any()) { var list = quests.Select(q => Tuple.Create(NGUITools.AddChild(uiContent, uiItemProto.gameObject), q)).ToList(); foreach (var q in list) { q.Item1.name = q.Item2.squest.questid.ToString(); UIEventListener.Get(q.Item1).onClick = go => OnQuestTraceClicked(q.Item2); q.Item1.SetActive(true); } yield return new WaitForEndOfFrame(); var height = 0; foreach (var _ in list) { var q = _; q.Item1.transform.localPosition = new Vector3(0, -height, 0); q.Item1.GetComponent<UIXmlRichText>().AddXml(q.Item2.TraceContent); height += q.Item1.GetComponent<UIWidget>().height; } uiContent.GetComponent<UIWidget>().height = height; } }
private void QuestManager_OnChanged(QuestManager sender) { if(sender == questManager) { Initialize(questManager); } }
void OnEnable() { //Get our references _PlayerGUI = GameObject.Find ("PlayerGUI"); _Manager = GameObject.FindGameObjectWithTag("EQManager").GetComponent<QuestManager>(); //Once we complete a quest, call the event. QuestManager.OnQuestFinish += CompleteQuest; }
void Start() { text = transform.GetChild (0).GetComponent<Text> (); qm = QMObj.GetComponent<QuestManager> (); hob = hoverObject.GetComponent<HoverObjectBehaviour> (); rt = this.GetComponent<RectTransform> (); this.GetComponent<Button>().onClick.AddListener(delegate() {sendToManager();}); }
public static QuestManager Instance() { lock(padlock) { if(singleton == null) singleton = new QuestManager(); } return singleton; }
void Start() { ListQuest = transform.FindChild("Quest Giver").GetComponentsInChildren<Quest>(); TotalPages = ListQuest.Length / 10; //we print 10 quests per pages Player = GameObject.Find ("Player"); PlayerManager = Player.GetComponent<PlayerManager> (); PlayerQuestManager = Player.transform.FindChild ("Quest Manager").GetComponent<QuestManager> (); PlayerListQuest = PlayerQuestManager.GetComponentsInChildren<Quest> (); }
void Start() { spriteRenderer = this.gameObject.GetComponent<SpriteRenderer>(); inventory = FindObjectOfType<Inventory>(); questManger = FindObjectOfType<QuestManager>(); //temp = new Fairy("test",12,"nope",0,10,true,Item.ItemType.Fairy,11,4,10,60,Fairy.FairyType.AttackBoost); //Debug.Log(temp.itemName); //temp.ActiveFairy = true; // StartCoroutine( CountDown(temp.Cooldown)); }
void Awake() { if(instance == null) { instance = this; } else if(instance != this) { Destroy(gameObject); } //DontDestroyOnLoad(gameObject); playerTransform = GameObject.FindWithTag("Player").GetComponent<Transform>(); questManager = gameObject.GetComponent<QuestManager>(); }
// Use this for initialization void Start () { Strength =Strength+ 20*(Level + Random.Range(1,10)); Defense = Defense + Level * 2; Dammage = Dammage + Level + Random.Range (0, 3); Health = 100 + Level * (5 * Level / 2); //Set the health in function of the level attackTime = Time.time; anim = GetComponent<Animation> (); Target = GameObject.Find ("Player").transform; playermanager = Target.GetComponent <PlayerManager>(); questmanager = Target.transform.FindChild("Quest Manager").GetComponent<QuestManager> (); }
// Use this for initialization void Start() { if (!UIExists) { UIExists = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } heroStats = GetComponent<HeroStats>(); manager = GameObject.FindGameObjectWithTag("QManager").GetComponent<QuestManager>(); }
void Awake() { anim = GetComponent<Animator>(); enemyAudio = GetComponent<AudioSource>(); hitParticles = GetComponentInChildren<ParticleSystem>(); capsuleCollider = GetComponent<CapsuleCollider>(); player = GameObject.FindGameObjectWithTag("Player"); questManager = player.GetComponent<QuestManager>(); levelUI = GameObject.FindGameObjectWithTag("Level"); levelManager = levelUI.GetComponent<LevelManager>(); gold = GameObject.FindGameObjectWithTag("Gold"); // goldManager = gold.GetComponent<GoldManager>(); currentHealth = startingHealth; clientServer = GameObject.FindGameObjectWithTag("ClientServer").GetComponent<ClientServer>(); myName = GameObject.FindGameObjectWithTag ("MultiplayerManager").GetComponent<MultiplayerManager>().nick; }
void Start() { //Grabbing our references player = GameObject.FindGameObjectWithTag ("Hero"); _Manager = GameObject.FindGameObjectWithTag("EQManager").GetComponent<QuestManager>(); text = GetComponentInChildren<TextMesh>(); //Quest Giver getting the quest needed for(int i = 0; i < _Manager.QList.Count; i++){ if(_Manager.QList[i].QuestID == QuestID && _Manager.QList[i].ProgressionID == ProgressID){ Quest = _Manager.QList[i]; OverallID = Quest.OverallID; return; } } }
public void Initialize(QuestManager questManager) { Debug.Log("Initializing QuestsDisplay"); // Destroy all children for(int i = 0; i < listTransform.childCount; i++) { Destroy(listTransform.GetChild(i).gameObject); } // Initialize quest list this.questManager = questManager; List<Quest> quests = questManager.Quests; foreach(Quest quest in quests) { QuestDisplay display = Instantiate(questDisplayPrefab) as QuestDisplay; display.transform.SetParent(listTransform, false); display.Initialize(quest); } }
public void Setup() { QuestManager.getSingleton().AddQuest(new QstWiseManGoogles().Setup()); }
private void Awake() { QuestManager = GetComponent <QuestManager>(); }
// Use this for initialization void Start() { theQM = FindObjectOfType <QuestManager>(); }
protected override void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) base.Awake(); this.get_gameObject().SetActive((FieldManager.IsValidInGameNoQuest() && !MonoBehaviourSingleton <FieldManager> .I.isTutorialField) || QuestManager.IsValidInGameWaveMatch()); }
// Update is called once per frame void Update() { //means tht it has it loaded if (_gameTime == null) { return; } if (QuestManager == null) { QuestManager = new QuestManager(); } QuestManager.Update(); //if (EnemyManager == null) //{ // EnemyManager = new EnemyManager(); //} //if (GameWasFullyLoadedAnd10SecAgo()) //{ // EnemyManager.Update(); //} AudioCollector.Update(); CreateDummySpawnPoint(); DebugInput(); DebugChangeScreenResolution(); if (Camera.main != null && _culling == null) { //bz camera needs to be initiated already _culling = new Culling(); _fustrum = new Fustrum(); } if (Camera.main != null && _audioPlayer == null && !audioWas) { audioWas = true; //bz camera needs to be initiated already _audioPlayer = new AudioPlayer(); } if (_fustrum != null) { _fustrum.Update(); } if (hud == null) { var hudGO = FindObjectOfType <HUDFPS>(); if (hudGO != null) { hud = hudGO.GuiText; HideShowTextMsg(); } } //if (Input.GetKeyUp(KeyCode.B)) //{ // //_staticBatch = new StaticBatch(); // //_meshBatch = new MeshBatch(); //} }
public void Start() { try { _dir = Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%/Desktop"), "NGUInjector"); if (!Directory.Exists(_dir)) { Directory.CreateDirectory(_dir); } var logDir = Path.Combine(_dir, "logs"); if (!Directory.Exists(logDir)) { Directory.CreateDirectory(logDir); } OutputWriter = new StreamWriter(Path.Combine(logDir, "inject.log")) { AutoFlush = true }; LootWriter = new StreamWriter(Path.Combine(logDir, "loot.log")) { AutoFlush = true }; CombatWriter = new StreamWriter(Path.Combine(logDir, "combat.log")) { AutoFlush = true }; AllocationWriter = new StreamWriter(Path.Combine(logDir, "allocation.log")) { AutoFlush = true }; PitSpinWriter = new StreamWriter(Path.Combine(logDir, "pitspin.log"), true) { AutoFlush = true }; _profilesDir = Path.Combine(_dir, "profiles"); if (!Directory.Exists(_profilesDir)) { Directory.CreateDirectory(_profilesDir); } var oldPath = Path.Combine(_dir, "allocation.json"); var newPath = Path.Combine(_profilesDir, "default.json"); if (File.Exists(oldPath) && !File.Exists(newPath)) { File.Move(oldPath, newPath); } } catch (Exception e) { Log(e.Message); Log(e.StackTrace); Loader.Unload(); return; } try { Character = FindObjectOfType <Character>(); Log("Injected"); LogLoot("Starting Loot Writer"); LogCombat("Starting Combat Writer"); Controller = Character.inventoryController; PlayerController = FindObjectOfType <PlayerController>(); _invManager = new InventoryManager(); _yggManager = new YggdrasilManager(); _questManager = new QuestManager(); _combManager = new CombatManager(); LoadoutManager.ReleaseLock(); DiggerManager.ReleaseLock(); Settings = new SavedSettings(_dir); if (!Settings.LoadSettings()) { var temp = new SavedSettings(null) { PriorityBoosts = new int[] { }, YggdrasilLoadout = new int[] { }, SwapYggdrasilLoadouts = false, SwapTitanLoadouts = false, TitanLoadout = new int[] { }, ManageDiggers = true, ManageYggdrasil = false, ManageEnergy = true, ManageMagic = true, ManageInventory = true, ManageGear = true, AutoConvertBoosts = true, SnipeZone = 0, FastCombat = false, PrecastBuffs = true, AutoFight = false, AutoQuest = false, AutoQuestITOPOD = false, AllowMajorQuests = false, GoldDropLoadout = new int[] {}, AutoMoneyPit = false, AutoSpin = false, MoneyPitLoadout = new int[] {}, AutoRebirth = false, ManageWandoos = false, MoneyPitThreshold = 1e5, DoGoldSwap = false, BoostBlacklist = new int[] {}, CombatMode = 0, RecoverHealth = false, SnipeBossOnly = true, AllowZoneFallback = false, QuestFastCombat = true, AbandonMinors = false, MinorAbandonThreshold = 30, QuestCombatMode = 0, AutoBuyEM = false, AutoSpellSwap = false, CounterfeitThreshold = 400, SpaghettiThreshold = 30, BloodNumberThreshold = 1e10, CastBloodSpells = false, IronPillThreshold = 10000, BloodMacGuffinAThreshold = 6, BloodMacGuffinBThreshold = 6, CubePriority = 0, CombatEnabled = false, GlobalEnabled = false, QuickDiggers = new int[] {}, QuickLoadout = new int[] {}, UseButterMajor = false, ManualMinors = false, UseButterMinor = false, ActivateFruits = false, ManageR3 = true, WishPriorities = new int[] {}, BeastMode = true, ManageNGUDiff = true, AllocationFile = "default", TitanGoldTargets = new bool[ZoneHelpers.TitanZones.Length], ManageGoldLoadouts = false, ResnipeTime = 3600, TitanMoneyDone = new bool[ZoneHelpers.TitanZones.Length], TitanSwapTargets = new bool[ZoneHelpers.TitanZones.Length], GoldCBlockMode = false, DebugAllocation = false, AdventureTargetITOPOD = false, ITOPODRecoverHP = false, ITOPODCombatMode = 0, ITOPODBeastMode = true, ITOPODFastCombat = true, ITOPODPrecastBuffs = false, DisableOverlay = false, OptimizeITOPODFloor = false, YggSwapThreshold = 1, UpgradeDiggers = true, BlacklistedBosses = new int[0], SpecialBoostBlacklist = new int[0], MoreBlockParry = false, WishSortOrder = false, WishSortPriorities = false, HackAdvance = false }; Settings.MassUpdate(temp); Log($"Created default settings"); } settingsForm = new SettingsForm(); if (string.IsNullOrEmpty(Settings.AllocationFile)) { Settings.SetSaveDisabled(true); Settings.AllocationFile = "default"; Settings.SetSaveDisabled(false); } if (Settings.TitanGoldTargets == null || Settings.TitanGoldTargets.Length == 0) { Settings.SetSaveDisabled(true); Settings.TitanGoldTargets = new bool[ZoneHelpers.TitanZones.Length]; Settings.SetSaveDisabled(false); } if (Settings.TitanMoneyDone == null || Settings.TitanMoneyDone.Length == 0) { Settings.SetSaveDisabled(true); Settings.TitanMoneyDone = new bool[ZoneHelpers.TitanZones.Length]; Settings.SetSaveDisabled(false); } if (Settings.TitanSwapTargets == null || Settings.TitanSwapTargets.Length == 0) { Settings.SetSaveDisabled(true); Settings.TitanSwapTargets = new bool[ZoneHelpers.TitanZones.Length]; Settings.SetSaveDisabled(false); } if (Settings.SpecialBoostBlacklist == null) { Settings.SetSaveDisabled(true); Settings.SpecialBoostBlacklist = new int[0]; Settings.SetSaveDisabled(false); } if (Settings.BlacklistedBosses == null) { Settings.SetSaveDisabled(true); Settings.BlacklistedBosses = new int[0]; Settings.SetSaveDisabled(false); } WishManager = new WishManager(); LoadAllocation(); LoadAllocationProfiles(); ZoneWatcher = new FileSystemWatcher { Path = _dir, Filter = "zoneOverride.json", NotifyFilter = NotifyFilters.LastWrite, EnableRaisingEvents = true }; ZoneWatcher.Changed += (sender, args) => { Log(_dir); ZoneStatHelper.CreateOverrides(_dir); }; ConfigWatcher = new FileSystemWatcher { Path = _dir, Filter = "settings.json", NotifyFilter = NotifyFilters.LastWrite, EnableRaisingEvents = true }; ConfigWatcher.Changed += (sender, args) => { if (IgnoreNextChange) { IgnoreNextChange = false; return; } Settings.LoadSettings(); settingsForm.UpdateFromSettings(Settings); LoadAllocation(); }; AllocationWatcher = new FileSystemWatcher { Path = _profilesDir, Filter = "*.json", NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName, EnableRaisingEvents = true }; AllocationWatcher.Changed += (sender, args) => { LoadAllocation(); }; AllocationWatcher.Created += (sender, args) => { LoadAllocationProfiles(); }; AllocationWatcher.Deleted += (sender, args) => { LoadAllocationProfiles(); }; AllocationWatcher.Renamed += (sender, args) => { LoadAllocationProfiles(); }; Settings.SaveSettings(); Settings.LoadSettings(); LogAllocation("Started Allocation Writer"); ZoneStatHelper.CreateOverrides(_dir); settingsForm.UpdateFromSettings(Settings); settingsForm.Show(); InvokeRepeating("AutomationRoutine", 0.0f, 10.0f); InvokeRepeating("SnipeZone", 0.0f, .1f); InvokeRepeating("MonitorLog", 0.0f, 1f); InvokeRepeating("QuickStuff", 0.0f, .5f); InvokeRepeating("ShowBoostProgress", 0.0f, 60.0f); InvokeRepeating("SetResnipe", 0f, 1f); reference = this; } catch (Exception e) { Log(e.ToString()); Log(e.StackTrace); Log(e.InnerException.ToString()); } }
// Use this for initialization void Start() { QM = GameObject.FindGameObjectWithTag("Manager").GetComponent<QuestManager>(); PCZ = GameObject.FindGameObjectWithTag("Player").GetComponent<Player_ControllerZ>(); }
void Start() { instance = this; }
void Awake() { EstablishSingleton(); _sceneManager = new SceneManager(); _questManager = new QuestManager(UIEvents); }
public Player(RealmManager manager, Client psr) : base(manager, (ushort)psr.Character.ObjectType, psr.Random) { try { control = false; Client = psr; Manager = psr.Manager; StatsManager = new StatsManager(this, psr.Random.CurrentSeed); Name = psr.Account.Name; AccountId = psr.Account.AccountId; FameCounter = new FameCounter(this, Client.Account); Tokens = psr.Account.FortuneTokens; HpPotionPrice = 5; MpPotionPrice = 5; Level = psr.Character.Level == 0 ? 1 : psr.Character.Level; Experience = psr.Character.Exp; ExperienceGoal = GetExpGoal(Level); Stars = GetStars(); Texture1 = psr.Character.Tex1; Texture2 = psr.Character.Tex2; Credits = psr.Account.Credits; NameChosen = psr.Account.NameChosen; CurrentFame = psr.Account.Stats.Fame; Fame = psr.Character.CurrentFame; XpBoosted = psr.Character.XpBoosted; XpBoostTimeLeft = psr.Character.XpTimer; xpFreeTimer = XpBoostTimeLeft != -1.0; LootDropBoostTimeLeft = psr.Character.LDTimer; lootDropBoostFreeTimer = LootDropBoost; LootTierBoostTimeLeft = psr.Character.LTTimer; lootTierBoostFreeTimer = LootTierBoost; var state = psr.Account.Stats.ClassStates.SingleOrDefault(_ => Utils.FromString(_.ObjectType) == ObjectType); FameGoal = GetFameGoal(state?.BestFame ?? 0); Glowing = IsUserInLegends(); Guild = GuildManager.Add(this, psr.Account.Guild); HP = psr.Character.HitPoints <= 0 ? psr.Character.MaxHitPoints : psr.Character.HitPoints; Mp = psr.Character.MagicPoints; ConditionEffects = 0; OxygenBar = 100; HasBackpack = psr.Character.HasBackpack == 1; PlayerSkin = Client.Account.OwnedSkins.Contains(Client.Character.Skin) ? Client.Character.Skin : 0; HealthPotions = psr.Character.HealthStackCount < 0 ? 0 : psr.Character.HealthStackCount; MagicPotions = psr.Character.MagicStackCount < 0 ? 0 : psr.Character.MagicStackCount; Locked = psr.Account.Locked ?? new List <string>(); Ignored = psr.Account.Ignored ?? new List <string>(); playerQuestManager = new QuestManager(this); try { Manager.Database.DoActionAsync(db => { Locked = db.GetLockeds(AccountId); Ignored = db.GetIgnoreds(AccountId); Muted = db.IsMuted(AccountId); DailyQuest = psr.Account.DailyQuest; var playerQuests = db.CharacterQuestGet(Client.Character.CharacterId); foreach (var j in playerQuests) { playerQuestManager.AddPlayerQuest(j.Item1, j.Item2, j.Item3, j.Item4); } }); } catch (Exception ex) { log.Error(ex); } if (HasBackpack) { var inv = psr.Character.Equipment.Select( _ => _ == -1 ? null : (Manager.GameData.Items.ContainsKey((ushort)_) ? Manager.GameData.Items[(ushort)_] : null)) .ToArray(); var backpack = psr.Character.Backpack.Select( _ => _ == -1 ? null : (Manager.GameData.Items.ContainsKey((ushort)_) ? Manager.GameData.Items[(ushort)_] : null)) .ToArray(); Inventory = inv.Concat(backpack).ToArray(); var xElement = Manager.GameData.ObjectTypeToElement[ObjectType].Element("SlotTypes"); if (xElement != null) { var slotTypes = Utils.FromCommaSepString32( xElement.Value); Array.Resize(ref slotTypes, 20); SlotTypes = slotTypes; } } else { Inventory = psr.Character.Equipment.Select( _ => _ == -1 ? null : (Manager.GameData.Items.ContainsKey((ushort)_) ? Manager.GameData.Items[(ushort)_] : null)) .ToArray(); var xElement = Manager.GameData.ObjectTypeToElement[ObjectType].Element("SlotTypes"); if (xElement != null) { SlotTypes = Utils.FromCommaSepString32( xElement.Value); } } Stats = new[] { psr.Character.MaxHitPoints, psr.Character.MaxMagicPoints, psr.Character.Attack, psr.Character.Defense, psr.Character.Speed, psr.Character.HpRegen, psr.Character.MpRegen, psr.Character.Dexterity }; Pet = null; for (var i = 0; i < SlotTypes.Length; i++) { if (SlotTypes[i] == 0) { SlotTypes[i] = 10; } } if (Client.Account.Rank >= 3) { return; } for (var i = 0; i < 4; i++) { if (Inventory[i]?.SlotType != SlotTypes[i]) { Inventory[i] = null; } } } catch (Exception e) { log.Error(e); } }
internal NativeQuestClient(QuestManager manager) { this.mManager = Misc.CheckNotNull(manager); }
void Start() { questManager = GameObject.Find("QuestsUI").GetComponent <QuestManager>(); dialManager = GameObject.Find("Dial").GetComponent <DialogueManager>(); }
public override DialogTree GetDialog() { DialogTree.Say _Say = new DialogTree.Say(); DialogTree.Choice _Choice = new DialogTree.Choice(); int _choice = dlg.GetDialogResult(); if (_choice > 0) { m_State = _choice; } if (m_State == 0) { QuestGlobals.getSingleton(); //Todo rebuild quest on Start/load int _GoogleQuestMile = QuestManager.getSingleton().GetQuestById((int)QuestGlobals.QuestEnum.QstWiseManGoogles).GetCurrMile().GetUId(); if (_GoogleQuestMile >= (int)QstWiseManGoogles.MileEnum.HuntGoogleQuest1 && _GoogleQuestMile < (int)QstWiseManGoogles.MileEnum.HuntGoogleQuest2) { m_State = 10; } } dlg.CreateDialogSetup(); _Say.m_Who = "Wise Man"; switch (m_State) { case 1: _Say.m_What = "You ponder your option"; _Choice.m_Choice = new int[] { 2, 3 }; _Choice.m_Text = new string[] { "Who are you?", "Are you blind?" }; dlg.AddElement(_Choice); break; case 10: _Say.m_What = "Hello again. Did you find my googles?"; _Choice.m_Choice = new int[] { 20, 30 }; _Choice.m_Text = new string[] { "No", "Yes" }; dlg.AddElement(_Choice); break; case 20: _Say.m_What = "I cannot help you if you dont find them."; dlg.SetDone(); break; case 2: _Say.m_What = "Iam old and know stuff."; m_State = 1; break; case 3: _Say.m_What = "I lost my googles. Please find them."; m_State = 1; _Choice.m_Choice = new int[] { 4, 5 }; _Choice.m_Text = new string[] { "Sure", "Nah" }; dlg.AddElement(_Choice); break; case 4: _Say.m_What = "You have got a quest."; m_State = 1; dlg.SetDone(); QuestManager.getSingleton().GetQuestById((int)QuestGlobals.QuestEnum.QstWiseManGoogles).ActivateMileByID( (int)QstWiseManGoogles.MileEnum.HuntGoogleQuest1); break; case 5: _Say.m_What = "Maybe later. Lets talk about other things."; m_State = 1; break; default: _Say.m_What = "Hello my friend. How may I help you?"; m_State = 1; break; } dlg.AddElement(_Say); return(dlg); }
void Awake() { _instance = this; }
private void Awake() { Instance = this; StartCoroutine(NextQuest()); }
void Awake() { Instance = this; }
// Use this for initialization void Start() { theQM = FindObjectOfType <QuestManager>(); inv = GameObject.Find("Inventory").GetComponent <Inventory>(); }
// Start is called before the first frame update void Start() { manager = FindObjectOfType <QuestManager>(); }
// Use this for initialization void Start() { QM = GameObject.FindGameObjectWithTag("Manager").GetComponent<QuestManager>(); audiosource = SE.GetComponent<AudioSource>(); }
void Start() { CurrentHealth = MaxHealth; thePlayerStats = FindObjectOfType <PlayerStats>(); theQM = FindObjectOfType <QuestManager>(); }
void Start() { anim = gameObject.transform.GetChild(0).GetComponent <Animator>(); foreach (Transform child in transform) { if (child.CompareTag("Enemy")) { eHealth = 10f; eSpeed = 0.5f; eCoinReward = 5; eDefense = 3f; eStrength = 1f; eRange = 5.75f; roamRange = 1.5f; coolDown = 3f; eWeak = 2; ePower = 0; questName = "Enemy"; Aggro = false; } else if (child.CompareTag("Chicken")) { eHealth = 3f; eSpeed = 0.75f; eCoinReward = 2; eDefense = 1f; eStrength = 1f; eRange = 3f; roamRange = 4f; coolDown = 2f; questName = "Chicken"; Aggro = false; } else if (child.CompareTag("Zombie")) { eHealth = 10f; eSpeed = 0.3f; eCoinReward = 15; eDefense = 5f; eStrength = 5f; eRange = 5.75f; roamRange = 4f; coolDown = 3f; eWeak = 2; ePower = 0; questName = "Zombie"; Aggro = true; } else if (child.CompareTag("Skeleton")) { eHealth = 15f; eSpeed = 0.75f; eCoinReward = 20; eDefense = 7f; eStrength = 7f; eRange = 5.75f; roamRange = 8f; coolDown = 1f; eWeak = 0; ePower = 2; questName = "Skeleton"; Aggro = true; } else if (child.CompareTag("Goblin")) { eHealth = 20f; eSpeed = 0.6f; eCoinReward = 50; eDefense = 15f; eStrength = 15f; eRange = 3.75f; roamRange = 5f; coolDown = 2f; eWeak = 1; ePower = 0; questName = "Goblin"; Aggro = false; } } player = GameObject.FindGameObjectWithTag("Player"); eTar = Instantiate(eTarget, transform.position, Quaternion.identity).GetComponent <RoamTarget>(); eTar.spawner = spawner; eTar.enemy = gameObject; aiPath = GetComponent <AIPath>(); theQM = FindObjectOfType <QuestManager>(); theDM = FindObjectOfType <DialogManager>(); spawnScript = spawner.GetComponent <SpawnEnemy>(); strSkill = player.GetComponent <StrengthSkill>(); defSkill = player.GetComponent <DefenseSkill>(); magSkill = player.GetComponent <MagicSkill>(); nAggro = Aggro; countDown = coolDown; startPos = transform.position; aiPath.speed = eSpeed; roaming = true; pDef = DefenseSkill.defLvl; }
// Projeto prisma lindo public Game() { Console.WriteLine(); log.Info("» Iniciando BIOS EMULADOR Para " + BiosEmuThiago.HotelName + ""); Console.WriteLine(); SessionUserRecord = 0; // Run Extra Settings // BotFrankConfig.RunBotFrank(); ExtraSettings.RunExtraSettings(); // Run Catalog Settings CatalogSettings.RunCatalogSettings(); // Run Notification Settings NotificationSettings.RunNotiSettings(); _languageManager = new LanguageManager(); _languageManager.Init(); _settingsManager = new SettingsManager(); _settingsManager.Init(); _packetManager = new PacketManager(); _clientManager = new GameClientManager(); _moderationManager = new ModerationManager(); _moderationManager.Init(); _itemDataManager = new ItemDataManager(); _itemDataManager.Init(); _catalogManager = new CatalogManager(); _catalogManager.Init(_itemDataManager); _craftingManager = new CraftingManager(); _craftingManager.Init(); _televisionManager = new TelevisionManager(); _navigatorManager = new NavigatorManager(); _roomManager = new RoomManager(); _chatManager = new ChatManager(); _groupManager = new GroupManager(); _groupManager.Init(); _groupForumManager = new GroupForumManager(); _questManager = new QuestManager(); _achievementManager = new AchievementManager(); _talentManager = new TalentManager(); _talentManager.Initialize(); _talentTrackManager = new TalentTrackManager(); _landingViewManager = new LandingViewManager(); _gameDataManager = new GameDataManager(); _botManager = new BotManager(); _cacheManager = new CacheManager(); _rewardManager = new RewardManager(); _badgeManager = new BadgeManager(); _badgeManager.Init(); // GetHallOfFame.GetInstance().Load(); _permissionManager = new PermissionManager(); _permissionManager.Init(); _subscriptionManager = new SubscriptionManager(); _subscriptionManager.Init(); TraxSoundManager.Init(); HabboCameraManager.Init(); HelperToolsManager.Init(); _figureManager = new FigureDataManager(BiosEmuThiago.GetConfig().data["game.legacy.figure_mutant"].ToString() == "1"); _figureManager.Init(); _crackableManager = new CrackableManager(); _crackableManager.Initialize(BiosEmuThiago.GetDatabaseManager().GetQueryReactor()); _furniMaticRewardsManager = new FurniMaticRewardsManager(); _furniMaticRewardsManager.Initialize(BiosEmuThiago.GetDatabaseManager().GetQueryReactor()); _targetedoffersManager = new TargetedOffersManager(); _targetedoffersManager.Initialize(BiosEmuThiago.GetDatabaseManager().GetQueryReactor()); }
// Use this for initialization void Start() { theQM = FindObjectOfType <QuestManager> (); QICA = FindObjectOfType <QuestItemCheckActive> (); theMM = FindObjectOfType <MoneyManager> (); }
public void Attach(MonoBehaviour root_object) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown if (!(root_object is Self)) { Transform val = root_object.get_transform(); int i = 0; for (int count = icons.Count; i < count; i++) { if (icons[i].target == val) { return; } } string text = string.Empty; int num = -1; MiniMapIcon miniMapIcon = null; if (root_object is PortalObject) { num = 0; } else if (root_object is Player) { Player player = root_object as Player; if (!player.isInitialized) { return; } num = 1; if (playerIconStock.Count > 0) { miniMapIcon = playerIconStock[0]; playerIconStock.Remove(miniMapIcon); } } else if (root_object is Enemy) { if (!GameSaveData.instance.enableMinimapEnemy && !QuestManager.IsValidInGameWaveMatch()) { return; } Enemy enemy = root_object as Enemy; if (!enemy.isInitialized) { return; } num = 2; if (enemyIconStock.Count > 0) { miniMapIcon = enemyIconStock[0]; enemyIconStock.Remove(miniMapIcon); } } else if (root_object is FieldWaveTargetObject) { FieldWaveTargetObject fieldWaveTargetObject = root_object as FieldWaveTargetObject; if (!fieldWaveTargetObject.isInitialized) { return; } num = 3; if (waveTargetIconStock.Count > 0) { miniMapIcon = waveTargetIconStock[0]; waveTargetIconStock.Remove(miniMapIcon); } text = "dp_radar_" + fieldWaveTargetObject.info.iconName; } if (miniMapIcon == null && num >= 0 && num < iconPrefabs.Length) { GameObject val2 = ResourceUtility.Instantiate <GameObject>(iconPrefabs[num]); if (val2 != null) { miniMapIcon = val2.GetComponent <MiniMapIcon>(); } } if (miniMapIcon != null) { miniMapIcon.Initialize(root_object); if (!text.IsNullOrWhiteSpace()) { miniMapIcon.SetIconSprite(text); } miniMapIcon.target = val; Utility.Attach(iconRoot, miniMapIcon._trasform); icons.Add(miniMapIcon); updateCount = 0; } } }
void Start() { CanGUI = true; //Grabbing our references hero = GameObject.FindGameObjectWithTag ("Hero"); manager = GameObject.FindGameObjectWithTag("QManager").GetComponent<QuestManager>(); _MouseLock = GameObject.FindGameObjectWithTag("QManager").GetComponent<MouseLockCheck>(); ComPQuest = true; //Quest Giver getting the quest needed for(int i = 0; i < manager.QList.Count; i++) { if(manager.QList[i].QuestID == QuestID && manager.QList[i].ProgressionID == ProgressID) { Quest = manager.QList[i]; OverallID = Quest.OverallID; return; } } }
private void Awake() { _instance = this; }
// Use this for initialization void Start() { qm = qmObject.GetComponent<QuestManager> (); pv = player.GetComponent<PlayerVolume> (); ch = chatHandlerObj.GetComponent<ChatHandler> (); if (hasQuest) { globalQuestID++; questID = globalQuestID; addtoGQID (); questIcon.SetActive (true); } else { questIcon.SetActive(false); } started = false; npc_quest_manager = this.GetComponent<NPC_Quest> (); quest = npc_quest_manager.getQuest (); }
private void Awake() { questManager = FindObjectOfType <QuestManager>(); }
// Use this for initialization private void Start() { m_CharacterController = GetComponent<CharacterController>(); m_Camera = Camera.main; m_OriginalCameraPosition = m_Camera.transform.localPosition; m_FovKick.Setup(m_Camera); m_HeadBob.Setup(m_Camera, m_StepInterval); m_StepCycle = 0f; m_NextStep = m_StepCycle/2f; m_Jumping = false; m_AudioSource = GetComponent<AudioSource>(); m_MouseLook.Init(transform , m_Camera.transform); questManager = new QuestManager(QuestText); questManager.LoadQuest(m_CurrentMainQuestID); dialogService = new DialogService(DialogText); inventory = new Inventory(); inventory.AddItem("FlashLight"); //scene haunted house if(m_CurrentMainQuestID >= 4) { torch = transform.Find("Torch").gameObject; if (torch != null) { torch.SetActive(false); } } }
void Start() { player = GameObject.Find ("_Player"); if (player) { qm = player.GetComponent<QuestManager>(); } else { Debug.LogError("QuestManagerUI Script attached to 'QuestManager' object could not find a player in the scene!"); } if (!questContainer) { Debug.LogError("QuestManagerUI Script attached to 'QuestManager' object could not find a child GameObject called 'Quests' the prefab connection could be broken."); } moreQuestInfo = transform.FindChild ("MoreQuestInfo").gameObject; if (!moreQuestInfo) { Debug.LogError ("QuestManagerUI script could not find the child object called 'MoreQuestInfo' the prefab may be broken"); } moreQuestInfoTitle = moreQuestInfo.transform.FindChild ("QuestTitle").GetComponent<Text> (); if (!moreQuestInfoTitle) { Debug.LogError ("QuestManagerUI script could not find the child object called 'QuestTitle' the prefab may be broken"); } moreQuestInfoDescription = moreQuestInfo.transform.FindChild ("ScrollView").transform.FindChild ("QuestDescription").GetComponent<Text> (); if (!moreQuestInfoDescription) { Debug.LogError ("QuestManagerUI script could not find the child object called 'QuestDescription' the prefab may be broken"); } mainScrollbar = transform.FindChild("MainScrollbar").GetComponent<Scrollbar>(); if(!mainScrollbar){ Debug.LogError ("QuestManagerUI script could not find the child object called 'MainScrollbar' the prefab may be broken"); } moreInfoScrollbar = transform.FindChild("MoreQuestInfo").FindChild("MoreQuestInfoScrollbar").GetComponent<Scrollbar>(); if(!moreInfoScrollbar){ Debug.LogError ("QuestManagerUI script could not find the child object called 'MoreQuestInfoScrollbar' the prefab may be broken"); } theEventSystem = GameObject.Find ("EventSystem").GetComponent<EventSystem>(); if(!theEventSystem){ Debug.LogError("QuestManagerUI script could not find the EventSystem in the scene. Make sure the scene has an EventSystem"); } questButton = questUI.GetComponent<Button> (); buttonHeight = questButton.GetComponent<RectTransform> ().sizeDelta.y; theLists = new List<Quest>[3]; theLists[0] = qm.currentQuests; theLists[1] = qm.failedQuests; theLists[2] = qm.completedQuests; for(int i = 0; i < theLists.Length; i++){ qcHeight += (theLists[i].Count * (buttonHeight + spacing) - spacing); } qm.LoadQuests (); }
public void Start() { _dir = Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%/Desktop"), "NGUInjector"); if (!Directory.Exists(_dir)) { Directory.CreateDirectory(_dir); } var logDir = Path.Combine(_dir, "logs"); if (!Directory.Exists(logDir)) { Directory.CreateDirectory(logDir); } OutputWriter = new StreamWriter(Path.Combine(logDir, "inject.log")) { AutoFlush = true }; LootWriter = new StreamWriter(Path.Combine(logDir, "loot.log")) { AutoFlush = true }; CombatWriter = new StreamWriter(Path.Combine(logDir, "combat.log")) { AutoFlush = true }; AllocationWriter = new StreamWriter(Path.Combine(logDir, "allocation.log")) { AutoFlush = true }; PitSpinWriter = new StreamWriter(Path.Combine(logDir, "pitspin.log"), true) { AutoFlush = true }; try { Character = FindObjectOfType <Character>(); Log("Injected"); LogLoot("Starting Loot Writer"); LogCombat("Starting Combat Writer"); LogAllocation("Started Allocation Writer"); Controller = Character.inventoryController; PlayerController = FindObjectOfType <PlayerController>(); _invManager = new InventoryManager(); _yggManager = new YggdrasilManager(); _questManager = new QuestManager(); _combManager = new CombatManager(); LoadoutManager.ReleaseLock(); DiggerManager.ReleaseLock(); Settings = new SavedSettings(_dir); if (!Settings.LoadSettings()) { var temp = new SavedSettings(null) { PriorityBoosts = new int[] { }, YggdrasilLoadout = new int[] { }, SwapYggdrasilLoadouts = true, HighestAKZone = 0, SwapTitanLoadouts = true, TitanLoadout = new int[] { }, ManageDiggers = true, ManageYggdrasil = true, ManageEnergy = true, ManageMagic = true, ManageInventory = true, ManageGear = true, AutoConvertBoosts = true, SnipeZone = 0, FastCombat = false, PrecastBuffs = true, AutoFight = false, AutoQuest = true, AutoQuestITOPOD = false, AllowMajorQuests = false, GoldDropLoadout = new int[] {}, AutoMoneyPit = false, AutoSpin = false, MoneyPitLoadout = new int[] {}, AutoRebirth = false, ManageWandoos = false, InitialGoldZone = -1, MoneyPitThreshold = 1e5, NextGoldSwap = false, BoostBlacklist = new int[] {}, GoldZone = 0, CombatMode = 0, RecoverHealth = false, SnipeBossOnly = true, AllowZoneFallback = false, QuestFastCombat = true, AbandonMinors = false, MinorAbandonThreshold = 30, QuestCombatMode = 0, AutoBuyEM = false, AutoSpellSwap = false, CounterfeitThreshold = 400, SpaghettiThreshold = 30, BloodNumberThreshold = 1e10, CubePriority = 0, CombatEnabled = false, GlobalEnabled = true, QuickDiggers = new int[] {}, QuickLoadout = new int[] {}, UseButterMajor = false, ManualMinors = false, UseButterMinor = false, ActivateFruits = true, ManageR3 = true, WishPriorities = new int[] {}, BeastMode = true }; Settings.MassUpdate(temp); Log($"Created default settings"); } settingsForm = new SettingsForm(); _profile = new CustomAllocation(_dir); _profile.ReloadAllocation(); ConfigWatcher = new FileSystemWatcher { Path = _dir, Filter = "settings.json", NotifyFilter = NotifyFilters.LastWrite, EnableRaisingEvents = true }; ConfigWatcher.Changed += (sender, args) => { if (IgnoreNextChange) { IgnoreNextChange = false; return; } Settings.LoadSettings(); settingsForm.UpdateFromSettings(Settings); }; AllocationWatcher = new FileSystemWatcher { Path = _dir, Filter = "allocation.json", NotifyFilter = NotifyFilters.LastWrite, EnableRaisingEvents = true }; AllocationWatcher.Changed += (sender, args) => { LoadAllocation(); }; Settings.SaveSettings(); Settings.LoadSettings(); settingsForm.UpdateFromSettings(Settings); settingsForm.Show(); InvokeRepeating("AutomationRoutine", 0.0f, 10.0f); InvokeRepeating("SnipeZone", 0.0f, .1f); InvokeRepeating("MonitorLog", 0.0f, 1f); InvokeRepeating("QuickStuff", 0.0f, .5f); InvokeRepeating("ShowBoostProgress", 0.0f, 60.0f); } catch (Exception e) { Log(e.Message); Log(e.StackTrace); } }
/// <summary> /// Creates a new game with given gameId. /// </summary> /// <param name="gameId"></param> public Game(int gameId) { this.GameId = gameId; this.Players = new ConcurrentDictionary<GameClient, Player>(); this._objects = new ConcurrentDictionary<uint, DynamicObject>(); this._worlds = new ConcurrentDictionary<int, World>(); this.StartingWorldSNOId = 71150; // FIXME: This must be set according to the game settings (start quest/act). Better yet, track the player's save point and toss this stuff. /komiga this.Quests = new QuestManager(this); this._tickWatch = new Stopwatch(); var loopThread = new Thread(Update) { IsBackground = true, CurrentCulture = CultureInfo.InvariantCulture }; ; // create the game update thread. loopThread.Start(); }
// Use this for initialization void Start() { dialogManager = FindObjectOfType <DialogManager> (); questManager = FindObjectOfType <QuestManager> (); }
// Use this for initialization void Start() { questManger = FindObjectOfType<QuestManager>(); AmmountOfNPC = questManger.AmmountOfQuests; NPC_List = new GameObject[AmmountOfNPC]; }
private void Start() { questManagerScript = questManager.GetComponent <QuestManager>(); }
// Use this for initialization void Start() { character_parameter = GetComponent<Character_Parameter>(); questmanager = GameObject.FindGameObjectWithTag("GameController").GetComponent<QuestManager>(); }
private void Start() { qM = this.gameObject.GetComponent <QuestManager>(); }
void Start() { qm = GameObject.FindObjectOfType<QuestManager>(); }
private void SetEphemeralValues() { ObjectDescriptionFlags |= ObjectDescriptionFlag.Player; // This is the default send upon log in and the most common. Anything with a velocity will need to add that flag. // This should be handled automatically... //PositionFlags |= PositionFlags.OrientationHasNoX | PositionFlags.OrientationHasNoY | PositionFlags.IsGrounded | PositionFlags.HasPlacementID; FirstEnterWorldDone = false; SetStance(MotionStance.NonCombat, false); // radius for object updates ListeningRadius = 5f; if (Session != null && Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) { if (Session.AccessLevel == AccessLevel.Admin) { IsAdmin = true; } if (Session.AccessLevel == AccessLevel.Developer) { IsArch = true; } if (Session.AccessLevel == AccessLevel.Sentinel) { IsSentinel = true; } if (Session.AccessLevel == AccessLevel.Envoy) { IsEnvoy = true; IsSentinel = true; //IsEnvoy is not recognized by the client and therefore the client should treat the user as a Sentinel. } if (Session.AccessLevel == AccessLevel.Advocate) { IsAdvocate = true; } } ContainerCapacity = (byte)(7 + AugmentationExtraPackSlot); if (Session != null && AdvocateQuest && IsAdvocate) // Advocate permissions are per character regardless of override { if (Session.AccessLevel == AccessLevel.Player) { Session.SetAccessLevel(AccessLevel.Advocate); // Elevate to Advocate permissions } if (AdvocateLevel > 4) { IsPsr = true; // Enable AdvocateTeleport via MapClick } } CombatTable = DatManager.PortalDat.ReadFromDat <CombatManeuverTable>(CombatTableDID.Value); _questManager = new QuestManager(this); ContractManager = new ContractManager(this); ConfirmationManager = new ConfirmationManager(this); LootPermission = new Dictionary <ObjectGuid, DateTime>(); SquelchManager = new SquelchManager(this); MagicState = new MagicState(this); RecordCast = new RecordCast(this); AttackQueue = new AttackQueue(this); return; // todo // ======================================= // This code was taken from the old Load() // ======================================= /*AceCharacter character; * * if (Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) * { * if (Session.AccessLevel == AccessLevel.Admin) * character.IsAdmin = true; * if (Session.AccessLevel == AccessLevel.Developer) * character.IsArch = true; * if (Session.AccessLevel == AccessLevel.Envoy) * character.IsEnvoy = true; * // TODO: Need to setup and account properly for IsSentinel and IsAdvocate. * // if (Session.AccessLevel == AccessLevel.Sentinel) * // character.IsSentinel = true; * // if (Session.AccessLevel == AccessLevel.Advocate) * // character.IsAdvocate= true; * }*/ // FirstEnterWorldDone = false; // IsAlive = true; }
public virtual void OnRoomLeaved() { Logd("OnRoomLeaved."); bool flag = IsBattleEnd(); isLeave = true; if (MonoBehaviourSingleton <CoopManager> .I.coopStage.stageId == stageId && !isBattleRetire && IsStageStart() && !flag && userInfo != null && QuestManager.IsValidInGame()) { uint id = 101u; if (isPartyOwner) { if (QuestManager.IsValidInGameWaveMatch()) { id = 111u; MonoBehaviourSingleton <InGameProgress> .I.BattleRetire(); } else if (QuestManager.IsValidInGameExplore()) { if (MonoBehaviourSingleton <InGameProgress> .IsValid()) { MonoBehaviourSingleton <InGameProgress> .I.ResetExploreHostDCTimer(); } else if (QuestManager.IsValidInGameExplore()) { MonoBehaviourSingleton <QuestManager> .I.UpdateExploreHostDCTime(30f); } } } string text = StringTable.Format(STRING_CATEGORY.IN_GAME, id, GetPlayerName()); UIInGamePopupDialog.PushOpen(text, false, 1.8f); } }
void Awake() { player = GameObject.Find ("_Player"); if (player) { qm = player.GetComponent<QuestManager>(); } else { Debug.Error("ui","QuestManagerUI Script attached to 'QuestManager' object could not find a player in the scene!"); } if (!questContainer) { Debug.Error("ui","QuestManagerUI Script attached to 'QuestManager' object could not find a child GameObject called 'Quests' the prefab connection could be broken."); } moreQuestInfo = transform.FindChild ("MoreQuestInfo").gameObject; if (!moreQuestInfo) { Debug.Error ("ui","QuestManagerUI script could not find the child object called 'MoreQuestInfo' the prefab may be broken"); } moreQuestInfoTitle = moreQuestInfo.transform.FindChild ("QuestTitle").GetComponent<Text> (); if (!moreQuestInfoTitle) { Debug.Error ("ui","QuestManagerUI script could not find the child object called 'QuestTitle' the prefab may be broken"); } moreQuestInfoDescription = moreQuestInfo.transform.FindChild ("ScrollView").transform.FindChild ("QuestDescription").GetComponent<Text> (); if (!moreQuestInfoDescription) { Debug.Error ("ui","QuestManagerUI script could not find the child object called 'QuestDescription' the prefab may be broken"); } mainScrollbar = transform.FindChild("MainScrollbar").GetComponent<Scrollbar>(); if(!mainScrollbar){ Debug.Error ("ui","QuestManagerUI script could not find the child object called 'MainScrollbar' the prefab may be broken"); } moreInfoScrollbar = transform.FindChild("MoreQuestInfo").FindChild("MoreQuestInfoScrollbar").GetComponent<Scrollbar>(); if(!moreInfoScrollbar){ Debug.Error ("ui","QuestManagerUI script could not find the child object called 'MoreQuestInfoScrollbar' the prefab may be broken"); } theEventSystem = GameObject.Find ("EventSystem").GetComponent<EventSystem>(); if(!theEventSystem){ Debug.Error("ui","QuestManagerUI script could not find the EventSystem in the scene. Make sure the scene has an EventSystem"); } gameHUD = GameObject.Find ("_HUDManager").GetComponent<GameHUD> (); if (!gameHUD) { Debug.Error("ui","Could not find the 'GameHUD' script on the '_HUDManager' GameObject in the scene: " + Application.loadedLevelName); } questButton = questUI.GetComponent<Button> (); buttonHeight = questButton.GetComponent<RectTransform> ().sizeDelta.y; theLists = new List<Quest>[3]; }
void Awake() { instance = this; }
// Use this for initialization void Start() { questManager = FindObjectOfType <QuestManager> (); nearby = false; i = GameObject.Find("PlayerInv").GetComponent <PlayerInventory> ().inventory; }