Ejemplo n.º 1
0
 public override void UpdateUI(GameTime gameTime)
 {
     if (_abilitiesInterface != null && AbilitiesUI.Visible)
     {
         AbilitiesUI.Update(gameTime);
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     abUI = GetComponentInParent <AbilitiesUI>();
     am   = GameObject.FindGameObjectWithTag("Player").GetComponent <AbilityManager>();
     gh   = GetComponentInParent <GameHandler>();
     es   = GetComponentInParent <EventSystem>();
     ps   = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerStats>();
 }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        player        = playerObj.GetComponent <Spaceship> ();
        _camera.focus = player;

        abilitiesUI           = abilitiesUIObj.GetComponent <AbilitiesUI> ();
        abilitiesUI.abilities = player.abilities;
        abilitiesUI.enabled   = true;
    }
Ejemplo n.º 4
0
    //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>();
    }
Ejemplo n.º 5
0
 // 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();
 }