private void Start()
 {
     _combatController   = GetComponent <scr_CombatController>();
     _movementController = GetComponent <scr_Movement>();
     _affectedBy         = GetComponent <scr_AffectedBy>();
     foreach (var ab in abilities)
     {
         script_AbilityCaster.PrepareAbility(ab.name);
     }
     //parentScript = GetComponent<scr_Player>();
 }
Example #2
0
        private void Start()
        {
            _myScript_BoardController = GameObject.Find("Board").GetComponent <script_BoardController>();
            _myScript_MovementParser  = GetComponent <script_MovementParser>();
            _myScript_AffectedBy      = GetComponent <scr_AffectedBy>();
            _canvasLocal            = transform.Find("Canvas_Local").GetComponent <Canvas>();
            _canvasWorld            = transform.Find("Canvas_World").GetComponent <Canvas>();
            _directions             = transform.Find("Canvas_Local/Directions").gameObject;
            _availableMovementField = transform.Find("Canvas_World/AdventurerHUD/Movement/Text").GetComponent <Text>();
            _inventoryHUD           = transform.Find("Canvas_World/InventoryHUD").gameObject;
            _hitpointsField         = transform.Find("Canvas_World/AdventurerHUD/Health/Text").GetComponent <Text>();
            _healthBar           = transform.Find("Canvas_Local/Healthbar").GetComponent <Slider>();
            _markerStun          = transform.Find("Canvas_Local/Marker_Stun").gameObject;
            myHitpoints          = 10;
            _hitpointsField.text = myHitpoints.ToString();
            _healthBar.value     = myHitpoints;
            _healthBar.maxValue  = myHitpoints;
            _healthBar.gameObject.SetActive(false);
            _markerStun.SetActive(false);

            _inventoryHUD.SetActive(false);
            _canvasLocal.gameObject.SetActive(false);
            _canvasWorld.gameObject.SetActive(false);
        }