private SkillGUI(SkillEnabled buttonsEnabled, IGUIMessages receiver) { buttonRow[0] = SkillButtonGUI.CreateShoot(); buttonRow[1] = SkillButtonGUI.CreateBuild(); buttonRow[2] = SkillButtonGUI.CreateSilence(); buttonRow[3] = SkillButtonGUI.CreateSkillCap(); textRow[0] = SkillAmountGUI.CreateShoot(); textRow[1] = SkillAmountGUI.CreateBuild(); textRow[2] = SkillAmountGUI.CreateSilence(); textRow[3] = SkillAmountGUI.CreateSkillCap(); descriptions[0] = new SkillDescription(TowerType.shoot); descriptions[0].position = new Rect(0,0,300,200); descriptions[1] = new SkillDescription(TowerType.build); descriptions[1].position = new Rect(0,0,300,200); descriptions[2] = new SkillDescription(TowerType.silence); descriptions[2].position = new Rect(0,0,300,200); descriptions[3] = new SkillDescription(TowerType.skillCap); descriptions[3].position = new Rect(0,0,300,200); SetSkillButtons(buttonsEnabled); this.receiver = receiver; }
public static GameGUIOptions Create(SkillEnabled skillsEnabled, bool makeNetworkGUI) { GameGUIOptions ret = new GameGUIOptions(); ret.skillsEnabled = skillsEnabled; ret.makeNetworkGUI = makeNetworkGUI; return ret; }
public static SkillGUI Create(SkillEnabled skillEnabled, IGUIMessages receiver) { SkillGUI ret = new SkillGUI(skillEnabled, receiver); float width = 300f; ret.position = new Rect(Screen.width/2-width/2,Screen.height-70,width,70); return ret; }
public static SkillGUI CreateAndroid(SkillEnabled skillEnabled, IGUIMessages receiver ) { Rect gameGUIPosition = GetGameGUIRect(); SkillGUI skillgui = new SkillGUI(skillEnabled, receiver); skillgui.position = new Rect(gameGUIPosition.x,gameGUIPosition.y+gameGUIPosition.height*(40f/110f),gameGUIPosition.width,gameGUIPosition.height*(70f/110f)); skillgui.AdjustPositions(); // Debug.Log("creating SkillGUI in rect: "+skillgui.position); return skillgui; }
public GameGUIOptions GetGUIOptions() { SkillEnabled guiButtonsEnabled = new SkillEnabled(); guiButtonsEnabled.SetAll(false); guiButtonsEnabled.shoot = true; GameGUIOptions guiOptions = GameGUIOptions.Create(guiButtonsEnabled,false); Stats.skillEnabled = guiButtonsEnabled; return guiOptions; }
/// <summary> /// 设置技能状态 /// </summary> /// <param name="aChief">武将对象</param> /// <param name="aStatus">新的状态</param> /// <param name="aData">全局数据对象</param> protected void SwitchSkillStatus(ChiefBase aChief, SkillEnabled aStatus, GlobalData aData) { SkillStatus = aStatus; aData.Game.AsynchronousCore.SendMessage(new ChiefBase[] { aChief }, new Beaver("skill.status", SkillName, SkillStatus.ToString()).ToString() //new XElement("skill.status", // new XElement("name" , SkillName ), // new XElement("status" , SkillStatus ) // ) , false ); }
public static SkillEnabled AllActive() { SkillEnabled ret = new SkillEnabled(); ret.SetAll(true); return ret; }
private void SilenceGUI() { SkillEnabled skl = new SkillEnabled(); skl.SetAll(true); skl.skillCap = false; skl.diagSkillCap = false; GameGUIOptions opt = GameGUIOptions.Create(skl,false); tutorialScene.ChangeGUIOptions(opt); Stats.skillEnabled = skl; Control.cState.player[0].playerSkill.Reset(); Control.SetUndoPoint(Control.cState); }
private void BuildGUI() { SkillEnabled skl = new SkillEnabled(); skl.SetAll(false); skl.build = true; GameGUIOptions opt = GameGUIOptions.Create(skl,false); tutorialScene.ChangeGUIOptions(opt); Stats.skillEnabled = skl; }
public void SetSkillButtons(SkillEnabled buttonsEnabled) { if(buttonsEnabled.shoot) skillEn[0] = true; if(buttonsEnabled.build) skillEn[1] = true; if(buttonsEnabled.silence) skillEn[2] = true; if(buttonsEnabled.skillCap) skillEn[3] = true; }
public void SetSkillButtons(SkillEnabled enabledButtons) { skillGUI.SetSkillButtons(enabledButtons); }
/// <summary> /// 构造函数 /// </summary> /// <param name="aSkillName">技能名称</param> /// <param name="aEnabled">技能初始状态</param> /// <param name="aIsMajestySkill">是否是主公技</param> public SkillBase(string aSkillName, SkillEnabled aEnabled, bool aIsMajestySkill) { SkillName = aSkillName; SkillStatus = aEnabled; IsMajestySkill = aIsMajestySkill; }