void Start() { fightSize = new Vector2(FightPanel.transform.GetComponent <RectTransform>().rect.width, FightPanel.transform.GetComponent <RectTransform>().rect.height); cardSize = mineCardPrefabs.transform.GetComponent <RectTransform>().sizeDelta; mineFightSize = new Vector2(fightSize.x, fightSize.y * (1 - per)); enemyFightSize = new Vector2(fightSize.x, fightSize.y * per); this.getMineCardScale(); this.getEnemyCardScale(); this.doSize(); mindPosList.Clear(); enemyPosList.Clear(); for (int i = 0; i < cardMaxNum; ++i) { Vector2 vMine = new Vector2(-fightSize.x * 0.5f + (mineCardScale * cardSize.x) * (i + 0.5f) + mineSpace * (i + 1), mineY); mindPosList.Add(vMine); Vector2 vEnemy = new Vector2(-fightSize.x * 0.5f + (enemyCardScale * cardSize.x) * (i + 0.5f) + enemySpace * (i + 1), enemyY); enemyPosList.Add(vEnemy); } FightWindow fightWindow = this.GetComponent <FightWindow>(); }
private void ShowFightWindow(params object[] arg) { ui_fightWindow = UIManager.OpenUI <FightWindow>(FightWindow.c_assetPath); ui_fightWindow.comp_rocker.Init(comp_playerMove, comp_cameraFollow); }
public void InitFightChange(FightWindow _window, Action _toMain) { m_FightWindow = _window; m_MainChapterButton.onClick.AddListener(OnClickFightChange); }