void Awake() { soundManager = FindObjectOfType <SoundManager>(); crowEnemyAI = this.gameObject.GetComponent <CrowEnemy_AI>(); animationComponent = this.gameObject.transform.GetComponentInChildren <SkeletonEnemy_Animation>(); pathfindingComponent = this.gameObject.transform.GetComponentInChildren <CrowEnemyAIPathfinding>(); if (this.gameObject.transform.GetChild(0) != null) { spriteRenderer = this.gameObject.transform.GetChild(0).GetComponent <SpriteRenderer>(); } waveManager = FindObjectOfType <WaveManager>(); waveManager.AddActiveEnemy(this.gameObject); quirkManager = FindObjectOfType <QuirkManager>(); playerCount = FindObjectOfType <PlayerCount>(); InitialiseClassInstance(); if (quirkManager.CurrentQuirk.quirkID == 3) { int chosenModifier = quirkManager.RandomiseMSModifier(); if (chosenModifier == 0) { basicEnemyClass.currentMovementSpeed = (basicEnemyClass.currentMovementSpeed / 2); } if (chosenModifier == 1) { basicEnemyClass.currentMovementSpeed = (basicEnemyClass.currentMovementSpeed * 2); } } }
void Awake() { pathfindingComponent = this.gameObject.GetComponent <CrowEnemyAIPathfinding>(); crowEnemyScript = this.gameObject.GetComponent <CrowEnemy>(); animationComponent = this.gameObject.transform.GetComponentInChildren <SkeletonEnemy_Animation>(); quirkManager = FindObjectOfType <QuirkManager>(); }
public bool LoadLua() { QuirkManager.TypingQuirks.Clear(); List <TypingQuirk> quirks = new List <TypingQuirk>(); string[] fileNames = Directory.GetFiles(_quirkPath, "*.lua", SearchOption.AllDirectories); string currentPath = ""; for (int i = 0; i < fileNames.Length; i++) { currentPath = fileNames[i]; TypingQuirk quirk = QuirkManager.LoadQuirk(File.ReadAllText(currentPath)); if (quirk != null) { quirks.Add(quirk); } } Logger.WriteInfo($"Loaded {quirks.Count} quirk script files."); QuirkManager.TypingQuirks = new ObservableCollection <TypingQuirk>(quirks); return(true); }
public void AssignSystemsReferences() { quirkManager = FindObjectOfType <QuirkManager>(); quirkPickerUI = FindObjectOfType <QuirkPickerUI>(); screenFadeHandler = FindObjectOfType <ScreenFadeHandler>(); runHandler = FindObjectOfType <RunHandler>(); }
void Awake() { attackComponent = this.gameObject.GetComponentInChildren <SkeletonEnemy_Attacking>(); pathfindingComponent = this.gameObject.GetComponent <SkeletonEnemy_Pathfinding>(); basicEnemy1Script = this.gameObject.GetComponent <SkeletonEnemy>(); animationComponent = this.gameObject.transform.GetComponentInChildren <SkeletonEnemy_Animation>(); quirkManager = FindObjectOfType <QuirkManager>(); soundManager = FindObjectOfType <SoundManager>(); }
public App() { InitializeComponent(); var logger = Common.Logging.LogManager.GetLogger <App>(); Quirks.Logging.Logger.Initialize(logger); MainPage = new MasterDetail(); QuirkManager.LoadQuirks(); }
private void Awake() { quirkManager = this.gameObject.GetComponent <QuirkManager>(); AssignCurrentRoomReference(); SetChildrenAlpha(0, quirk1UI); SetChildrenAlpha(0, quirk2UI); SetChildrenAlpha(0, quirk3UI); SetChildrenAlpha(0, pickQuirkText); //cardSelectColliders.SetActive(false); ColliderOff(); MoveUIOffScreen(); }