Exemplo n.º 1
0
    void Start()
    {
        actionPanelController = Global.Component.GetActionPanelController();
        controller            = Global.Component.GetController();

        dropPosition = new Vector3(transform.position.x + Global.TileMaps.TILE_OFFSET,
                                   transform.position.y + Global.TileMaps.TILE_OFFSET,
                                   transform.position.z);
    }
Exemplo n.º 2
0
 private void Start()
 {
     _btn            = GetComponent <Button>();
     _heroController = GetComponentInParent <HeroController>();
     if (_heroController)
     {
         APC = _heroController.GetComponentInChildren <ActionPanelController>();
     }
     BM = FindObjectOfType <BattleManager>();
     if (_heroController)
     {
         BCCostPerTime += BCCostPerLevel * _heroController.LEVEL
                          + BCCostPerSkillGrade * SkillGrade
                          + (int)(_heroController._role.CurrentExportRAL.Hp
                                  * BCCostUsingPercent * 0.01f);
     }
 }
Exemplo n.º 3
0
 private void Awake()
 {
     APC   = GetComponentInChildren <ActionPanelController>();
     BM    = FindObjectOfType <BattleManager>();
     GoldC = GetComponentInChildren <SDGoldController>();
     if (APC)
     {
         APC.transform.localScale = Vector3.one * 1.2f;
     }
     if (GetComponent <HeroController>())
     {
         HeroProperty = GetComponent <HeroController>();
     }
     if (GetComponent <EnemyController>())
     {
         EnemyProperty = GetComponent <EnemyController>();
     }
 }
Exemplo n.º 4
0
    BuffController buffController;          // для инита бафов при одетом шмоте в функции InitItemInInventory()

    void Start()
    {
        instance = this;
        //DontDestroyOnLoad(transform.gameObject);
        // еслт какое-то окно активно, запретить управление
        actionWindow       = Global.Component.GetActionWindowController();
        dialogWindow       = Global.Component.GetDialogueManager();
        actionPanel        = Global.Component.GetActionPanelController();
        playerMovement     = Global.Obj.GetPlayerGameObject().GetComponent <PlayerMovement>();
        terminalController = Global.Component.GetTerminalController();
        buffController     = Global.Component.GetBuffController();

        InitCells();
        InitItemInInventory();
        currentHand = left_hand_btn;

        SetHandColor();
        // отресовка всех одетых вещей
        UpdateAllEqupment();

        SetBagCellList();
        SetSellList();
        SetInvCellList();
    }
Exemplo n.º 5
0
 void Start()
 {
     actionPanelController = Global.Component.GetActionPanelController();
     controller            = Global.Component.GetController();
 }
Exemplo n.º 6
0
 public void NextActionUnit()
 {
     if (Remaining_ORL.Count == 0)
     {
         return;
     }
     if (Remaining_SRL.Count == 0)
     {
         return;
     }
     if (_currentBattleUnit != null)
     {
         _currentBattleUnit.actionSign.gameObject.SetActive(false);
     }
     _currentBattleUnit = All_Array[0];
     All_Array.Remove(_currentBattleUnit);
     All_Array.Add(_currentBattleUnit);
     if (_currentBattleUnit.IsDead)
     {
         NextActionUnit();
         return;
     }
     if (_currentBattleUnit.ReadThisStateEnable(StateTag.Dizzy))
     {
         _currentBattleUnit.CheckStates();
         if (SDGameManager.Instance.isFastModeEnabled)
         {
             NextActionUnit();
         }
         return;
     }
     _currentBattleUnit.actionSign.gameObject.SetActive(true);
     _currentActionPanel = _currentBattleUnit.APC;
     checkCurrentUnitTag();
     //
     _currentBattleUnit.CheckStates();//计算角色状态对其影响
     if (_currentBattleUnit.IsDead)
     {
         NextActionUnit();
         return;//重新进行死亡判断
     }
     if (_currentBUType != SDConstants.CharacterType.Enemy)
     {
         if (SDDataManager.Instance.SettingData.isAutoBattle)
         {
             _currentActionPanel.chooseRandomSkillFromGroup();
             chooseAutoBattleTarget();
             handleAction();
         }
         else
         {
             SDGameManager.Instance.isUsingProp = false;
             //
             IsWaitingPlayerAction = true;
             //显示全部可用交互
             _currentActionPanel.showActionPanel();
             //UsingPropBtn.interactable = true;
             CancelBtn.interactable = true;
         }
     }
     else
     {
         _currentActionPanel.showActionPanel();
         _currentActionPanel.chooseASkillFromSkillGroup();
         chooseRandomHeroToAttack();
         handleAction();
     }
     currentTouchId   = -1;
     confirmSkillStep = 0;
 }
Exemplo n.º 7
0
 void Start()
 {
     commandController = GetComponentInChildren <CommandController>();
     actionController  = GetComponentInChildren <ActionPanelController>();
 }