Exemple #1
0
    private void Awake()
    {
        softSkillsController = SoftSkillsController.Instance;
        softSkillsController.OnSoftSkillUpdate.AddListener(OnSoftSkillUpdateHandler);

        //set Item Slots
        softSkillSlots = new List <BaseSoftSkillSlot>();
        if (itemsParent != null)
        {
            itemsParent.GetComponentsInChildren(includeInactive: true, result: softSkillSlots);
        }
    }
Exemple #2
0
    private void Start()
    {
        softSkillsController       = SoftSkillsController.Instance;
        charactersStatusController = CharacterStatusController.Instance;
        playerAction               = PlayerAction.Instance;
        _currentSoftSkillId        = string.Empty;
        _currentStatusId           = StatusType.None;
        _cureentSoftSkillUpgrade   = INST_VALUE_ONE;
        _currentStatusValueUpgrade = INST_VALUE_ONE;
        OnButtonClicked(default_valueStatusUpgrade_Button[0]);

        if (!ReferenceEquals(charactersStatusController, null))
        {
            charactersStatusController.OnStatusPointsUpdated.AddListener(OnStatusPointsUpdatedHandler);
            charactersStatusController.OnSoftSkillPointsUpdated.AddListener(OnSoftSkillPointsUpdatedHandler);
        }

        if (!ReferenceEquals(status_display, null))
        {
            //Events status
            status_display.OnLeftClickStatusSlot.AddListener(SelectedStatusDisplayed);
            status_display.OnPointEnterStatusSlot.AddListener(DisplayedStatusDescription);
            status_display.OnPointExitStatusSlot.AddListener(UnDisplayedStatusDescription);
            status_display.OnStatusUpLevel.AddListener(OnStatusUpLevelHandler);
        }

        if (!ReferenceEquals(bonusSlot, null))
        {
            //Events Bonus
            bonusSlot.OnLeftClickBonusSlotEvent.AddListener(SelectedBonusDisplayed);
            bonusSlot.OnPointEnterBonusSlotEvent.AddListener(DisplayedBonusDescription);
            bonusSlot.OnPointExitBonusSlotEvent.AddListener(UnDisplayedBonusDescription);
        }

        if (!ReferenceEquals(hardSkill_display, null))
        {
            //Events Bonus
            hardSkill_display.OnLeftClickHardSkillSlotEvent.AddListener(SelectedHardSkillDisplayed);
            hardSkill_display.OnPointEnterHardSkillSlotEvent.AddListener(DisplayedHardSkillDescription);
            hardSkill_display.OnPointExitHardSkillSlotEvent.AddListener(UnDisplayedHardSkillDescription);
        }

        if (!ReferenceEquals(softSkill_display, null))
        {
            softSkill_display.OnLeftClickSoftSkillSlotEvent.AddListener(SelectedSoftSkillDisplayed);
            softSkill_display.OnPointEnterSoftSkillSlotEvent.AddListener(DisplayedSoftSkillDescription);
            softSkill_display.OnPointExitSoftSkillSlotEvent.AddListener(UnDisplayedSoftSkillDescription);
            softSkill_display.OnSoftSkillUpLevel.AddListener(OnSoftSkillUpLevelHandler);
        }

        Reset();
    }