private void OnMouseDown() { prompt_localPos.ClearPrompt(); isSelect = true; #region 傳送數據 switch (Iam) { case (Prompt_SelectLocalPos.whois.Soldier): if (soldier == null) { return; } prompt_localPos.setMoInBtMenu(SoldierData.headImage, SoldierData.firstAtk, SoldierData.objectName); prompt_localPos.setClickObj(soldier.enemyData.UI_MaxHp, soldier.enemyData.UI_HP, 0, 0); prompt_localPos.setClickObj(soldier.enemyData.ATK_Level, soldier.enemyData.DEF_Level); return; case (Prompt_SelectLocalPos.whois.Tower): prompt_localPos.setMoInBtMenu(TowerData.headImage, null, TowerData.objectName); prompt_localPos.setClickObj(TowerData.UI_maxHp, TowerData.UI_Hp, TowerData.Fad_maxThermalEnergy, TowerData.Fad_thermalEnergy); prompt_localPos.setClickObj(TowerData.ATK_Level, TowerData.DEF_Level); return; case (Prompt_SelectLocalPos.whois.Player): prompt_localPos.setMoInBtMenu(Player_Data.headImage, null, Player_Data.objectName); prompt_localPos.setClickObj(Player_Data.Hp_Max, Player_Data.Hp_original, Player_Data.Ap_Max, Player_Data.Ap_original); prompt_localPos.setClickObj(Player_Data.ATK_Level, Player_Data.DEF_Level); return; } #endregion prompt_localPos.openMenu(Prompt_SelectLocalPos.allMenu.Click_Obj); }
public void OnPointerEnter(PointerEventData eventData) { prompt_localPos.ClearPrompt(); #region 傳送數據 switch (Iam) { case (Prompt_SelectLocalPos.whois.Building): prompt_localPos.openMenu(Prompt_SelectLocalPos.allMenu.MoinB_build); return; case (Prompt_SelectLocalPos.whois.Core): return; case (Prompt_SelectLocalPos.whois.Soldier): prompt_localPos.setMoInBtMenu(SoldierData.headImage, SoldierData.firstAtk, SoldierData.objectName); prompt_localPos.setMoInBtMenu_Need(SoldierData.cost_Money, 0, 0); prompt_localPos.setMoInBtMenu_Bar(SoldierData.atk_Damage, SoldierData.atk_delay, SoldierData.def_base, SoldierData.moveSpeed); break; case (Prompt_SelectLocalPos.whois.Tower): prompt_localPos.setMoInBtMenu(TowerData.headImage, null, TowerData.objectName); prompt_localPos.setMoInBtMenu_Need(TowerData.cost_Money, TowerData.cost_Electricity, TowerData.turret_delayTime); prompt_localPos.setMoInBtMenu_Bar(TowerData.Atk_Damage, TowerData.Atk_Gap, TowerData.def_base, 0); break; } #endregion prompt_localPos.openMenu(Prompt_SelectLocalPos.allMenu.MoinB_atk); }
public void Info_MouseIn(MyEnemyData.Enemies _data, int _population) { prompt_localPos.ClearPrompt(); prompt_localPos.setMoInBtMenu(_data.headImage, _data.firstAtk, _data.objectName); prompt_localPos.setMoInBtMenu_Need(_data.cost_Money, 0, 0); prompt_localPos.setMoInBtMenu_Bar(_data.atk_Damage, _data.atk_delay, _data.def_base, _data.moveSpeed); prompt_localPos.openMenu(Prompt_SelectLocalPos.allMenu.MoinB_atk); if (populationText != null) { populationText.text = _population.ToString(); } }