private void OnEnable() { InitializeUxmlTemplate(); InitializeLocations(); CandyCornManager = GameObject.Find("CandyCornManager").GetComponent <CandyCornManager>(); //currentLocationSelected = GameObject.Find("DebugPositions").transform.GetChild(0).GetComponent<DebugPosition>(); var root = rootVisualElement.Q("Root"); CandiesField = root.Q <IntegerField>("CandiesField"); ReloadCandiesButton = rootVisualElement.Q <Button>("ReloadCandiesButton"); ReloadCandiesButton.clicked += OnReloadCandiesPressed; ResetCandiesButton = root.Q <Button>("ResetButton"); ResetCandiesButton.clicked += OnResetCandiesPressed; AddCandiesButton = root.Q <Button>("AddButton"); AddCandiesButton.clicked += OnAddCandiesPressed; RemoveCandiesButton = root.Q <Button>("RemoveButton"); RemoveCandiesButton.clicked += OnRemoveCandiesPressed; ReloadLocationButton = rootVisualElement.Q <Button>("ReloadLocationButton"); ReloadLocationButton.clicked += OnReloadLocationPressed; LocationDropdown = root.Q <ToolbarMenu>("LocationDropdown"); PopulateLocationsDropdown(); }
void Start() { #if UNITY_EDITOR AssetDatabase.Refresh(); // This will update all animators, fixes a bug with Git! #endif BattleVictoryBanner = GameObject.Find("BattleVictoryBanner"); BattleVictoryBanner.GetComponent <CanvasGroup>().alpha = 0f; MainCamera = GameObject.FindGameObjectWithTag("MainCamera"); CameraRig = MainCamera.GetComponent <CameraRig>(); Sield = GameObject.Find("Sield"); Ganiel = GameObject.Find("Sield"); CandyCornManager = GameObject.FindObjectOfType <CandyCornManager>(); }
public void Start() { NotEnoughCandiesPrompt = GameObject.Find("NotEnoughCandyText"); NotEnoughCandiesPrompt.GetComponent <CanvasGroup>().alpha = 0f; CandyCornManager = GameObject.FindObjectOfType <CandyCornManager>(); TargetSelector = GameObject.FindGameObjectWithTag("TargetSelector").GetComponent <TargetSelector>(); CombatSystem = GameObject.FindGameObjectWithTag("CombatSystem").GetComponent <CombatSystem>(); Animator = GetComponentInParent <Animator>(); //CurrentPhase = Phase.Inactive; if (GetComponent <Combatant>() != null) { Combatant = GetComponent <Combatant>(); } else { Combatant = GetComponentInParent <Combatant>(); } }
void Start() { ActiveLineIndex = 0; DisplayDialogueBubble = false; CandyCornManager = GameObject.FindObjectOfType <CandyCornManager>(); }