update combo
This commit is contained in:
@@ -101,16 +101,21 @@ namespace BrewMonster
|
||||
SetImage(pHost.GetPositiveSkillByIndex(i), ptSkillSlotList[i]);
|
||||
m_skills.Add(pHost.GetPositiveSkillByIndex(i).GetSkillID());
|
||||
}
|
||||
for (i = 0; i < passiveSkillNum; i++)
|
||||
{
|
||||
if (psSkillSlotList.Count <= i)
|
||||
{
|
||||
psSkillSlotList.Add(Instantiate(psSkillSlotList[0], psSkillContainer));
|
||||
}
|
||||
psSkillSlotList[i].transform.GetChild(0).gameObject.SetActive(true);
|
||||
SetImage(pHost.GetPassiveSkillByIndex(i), psSkillSlotList[i]);
|
||||
m_skills.Add(pHost.GetPassiveSkillByIndex(i).GetSkillID());
|
||||
}
|
||||
// for (i = 0; i < passiveSkillNum; i++)
|
||||
// {
|
||||
// if (psSkillSlotList.Count <= i)
|
||||
// {
|
||||
// psSkillSlotList.Add(Instantiate(psSkillSlotList[0], psSkillContainer));
|
||||
// }
|
||||
// psSkillSlotList[i].transform.GetChild(0).gameObject.SetActive(true);
|
||||
// EC_VIDEO_SETTING setting = EC_Game.GetConfigs().GetVideoSettings();
|
||||
// var setting.comboSkill[((CECSCSkillGrp*)pSC)->GetGroupIndex()].nIcon + 1
|
||||
// GetGameUIMan().SetCover(psSkillSlotList[i], "unknown", EC_GAMEUI_ICONS.ICONS_SKILL);
|
||||
// // pCell->SetCover(GetGameUIMan()->m_pA2DSpriteIcons[CECGameUIMan::ICONS_SKILLGRP],
|
||||
// // );
|
||||
// SetImage(pHost.GetPassiveSkillByIndex(i), psSkillSlotList[i]);
|
||||
// m_skills.Add(pHost.GetPassiveSkillByIndex(i).GetSkillID());
|
||||
// }
|
||||
}
|
||||
private void SetImage(CECSkill cECSkill, AUIImagePicture learnedSkillUI)
|
||||
{
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace BrewMonster
|
||||
{
|
||||
ClearPendingActionAssign();
|
||||
// Debug.Log("HoangDev: CreateSkillShortcut: " + currentSelectedSlotIndex + " : " + assignedSkill.GetSkillID());
|
||||
//CECShortcutSet pSCS = CECGameRun.Instance.GetHostPlayer().GetShortcutSet1(0);
|
||||
// CECShortcutSet pSCS = CECGameRun.Instance.GetHostPlayer().GetShortcutSet1(0);
|
||||
|
||||
a_pSCS[currentListIndex].CreateSkillShortcut(currentSelectedSlotIndex, assignedSkill);
|
||||
EventBus.Publish(new OnAssignSkillEvent(assignedSkill.GetSkillID(), currentSelectedSlotIndex));
|
||||
|
||||
@@ -2,6 +2,8 @@ using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
|
||||
using BrewMonster.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BrewMonster.Network;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -15,6 +17,8 @@ namespace BrewMonster
|
||||
[SerializeField] private List<AUIToggleSkillAssign> psSkillSlotList;
|
||||
[SerializeField] private List<AUIToggleSkillAssign> ptSkillSlotList;
|
||||
|
||||
private int _otherSkillIndex;
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@@ -50,6 +54,7 @@ namespace BrewMonster
|
||||
UpdateView();
|
||||
SubscribeAssignEvents();
|
||||
HookAssignSkillToggles();
|
||||
_otherSkillIndex = 0;
|
||||
}
|
||||
|
||||
private void SubscribeAssignEvents()
|
||||
@@ -131,17 +136,40 @@ namespace BrewMonster
|
||||
ptSkillSlotList[i].SetSkillID(processSkillID);
|
||||
m_skills.Add(processSkillID);
|
||||
}
|
||||
|
||||
ShowSkillGrp();
|
||||
// for (i = 0; i < passiveSkillNum; i++)
|
||||
// {
|
||||
// if (psSkillSlotList.Count <= i)
|
||||
// {
|
||||
// psSkillSlotList.Add(Instantiate(psSkillSlotList[0], psSkillContainer));
|
||||
// }
|
||||
// psSkillSlotList[i].transform.GetChild(0).gameObject.SetActive(true);
|
||||
// psSkillSlotList[i].transform.GetChild(i).gameObject.SetActive(true);
|
||||
// SetImage(pHost.GetPassiveSkillByIndex(i), psSkillSlotList[i]);
|
||||
// m_skills.Add(pHost.GetPassiveSkillByIndex(i).GetSkillID());
|
||||
// }
|
||||
}
|
||||
private void ShowSkillGrp()
|
||||
{
|
||||
EC_VIDEO_SETTING setting = EC_Game.GetConfigs().GetVideoSettings();
|
||||
CECHostPlayer pHost = GetHostPlayer();
|
||||
foreach (var skill in setting.comboSkill)
|
||||
{
|
||||
if (skill.nIcon > 0)
|
||||
{
|
||||
if (psSkillSlotList.Count <= _otherSkillIndex)
|
||||
{
|
||||
psSkillSlotList.Add(Instantiate(psSkillSlotList[0], psSkillContainer));
|
||||
}
|
||||
psSkillSlotList[_otherSkillIndex].transform.GetChild(0).gameObject.SetActive(true);
|
||||
//todo: temporary use default icon: 爱你
|
||||
GetGameUIMan().SetCover(psSkillSlotList[_otherSkillIndex],"爱你", EC_GAMEUI_ICONS.ICONS_SKILLGRP);
|
||||
psSkillSlotList[_otherSkillIndex].SetSkillID();
|
||||
// m_skills.Add(pHost.GetPassiveSkillByIndex(i).GetSkillID());
|
||||
_otherSkillIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void SetImage(CECSkill cECSkill, AUIToggleSkillAssign learnedSkillUI)
|
||||
{
|
||||
if(cECSkill == null)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1542,9 +1542,9 @@ RectTransform:
|
||||
- {fileID: 4504331075840543341}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 108.9562, y: -31.05}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8804506040386004496
|
||||
@@ -4305,9 +4305,9 @@ RectTransform:
|
||||
- {fileID: 2027606699309904338}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 468.781, y: -31.05}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6741821173640675138
|
||||
@@ -13116,9 +13116,9 @@ RectTransform:
|
||||
- {fileID: 911293677621153352}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 288.8686, y: -31.05}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5623009994815814977
|
||||
|
||||
Reference in New Issue
Block a user