public override void UpdateUI(GameTime gameTime) { if (_abilitiesInterface != null && AbilitiesUI.Visible) { AbilitiesUI.Update(gameTime); } }
void Start() { abUI = GetComponentInParent <AbilitiesUI>(); am = GameObject.FindGameObjectWithTag("Player").GetComponent <AbilityManager>(); gh = GetComponentInParent <GameHandler>(); es = GetComponentInParent <EventSystem>(); ps = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerStats>(); }
// Use this for initialization void Start() { player = playerObj.GetComponent <Spaceship> (); _camera.focus = player; abilitiesUI = abilitiesUIObj.GetComponent <AbilitiesUI> (); abilitiesUI.abilities = player.abilities; abilitiesUI.enabled = true; }
//void Awake() //{ // interactAction.performed += InteractInput; // leftAction.performed += LeftInput; // topAction.performed += TopInput; // rightAction.performed += RightInput; // abilityPanelAction.performed += AbilityPanelInput; //} //void OnEnable() //{ // interactAction.Enable(); // leftAction.Enable(); // topAction.Enable(); // rightAction.Enable(); // abilityPanelAction.Enable(); //} //void OnDisable() //{ // interactAction.performed -= InteractInput; // interactAction.Disable(); // leftAction.performed -= LeftInput; // leftAction.Disable(); // topAction.performed -= TopInput; // topAction.Disable(); // rightAction.performed -= RightInput; // rightAction.Disable(); // abilityPanelAction.performed -= AbilityPanelInput; // abilityPanelAction.Disable(); //} // Start is called before the first frame update void Start() { currentStamina = startingStamina; anim = GetComponent <Animator>(); intBox = playerIntBox.GetComponent <CircleCollider2D>(); hb = GetComponent <CircleCollider2D>(); ph = GetComponent <PlayerHealth>(); pm = GetComponent <PlayerMovement>(); rb = GetComponent <Rigidbody2D>(); withinReach = GetComponentInChildren <IntBoxController>().withinReach; gh = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameHandler>(); abUIPanel = GameObject.FindGameObjectWithTag("GameController").GetComponent <AbilitiesUI>(); }
// Use this for initialization void Start() { abilitiesUI = FindObjectOfType <AbilitiesUI>(); underAttackUI = FindObjectOfType <UnderAttackUI>(); playerVitalsUI = FindObjectOfType <PlayerVitalsUI>(); dialogueUI = FindObjectOfType <DialogueUI>(); npcController = FindObjectOfType <NPCs>(); //currentAbility = CombatAbilities.passive; playerCharacter = FindObjectOfType <PlayerCharacter>(); SelectedAbilityOption = "selectedAbilityOption"; CreateSelectionToggleGroup(SelectedAbilityOption); HideAbilities(); HideUnderAttack(); HidePlayerVitals(); }