Inheritance: MonoBehaviour
Ejemplo n.º 1
0
    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();
    }
Ejemplo n.º 2
0
    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>();
    }
Ejemplo n.º 3
0
 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>();
     }
 }
Ejemplo n.º 4
0
 void Start()
 {
     ActiveLineIndex       = 0;
     DisplayDialogueBubble = false;
     CandyCornManager      = GameObject.FindObjectOfType <CandyCornManager>();
 }