// Use this for initialization public GUIManager() { // Going to make the layout of the screen in 6s sizeDivisor = 6; manaInvasion = new ManaInvasion (Screen.width - Screen.width/sizeDivisor, 0, Screen.width/sizeDivisor,Screen.height/sizeDivisor); /* timeZone = "Future"; loadCount = 0; width = 300; height = 120; loadTime = 5; x = 0; y = Screen.height-height;*/ int height = 120; futureButton = new FutureButton("Future", 0, 300, height, 5, 0, Screen.height - height); /* width = 100; height = 90; spacing = 10;*/ rollingButton = new RollingButton (100,90,10); selectorOverlay = new SelectorOverlay(); castSpell = new CastSpell(); readyButton = new ReadyButton (Screen.width - Screen.width/sizeDivisor, Screen.height-Screen.height/sizeDivisor, Screen.width/sizeDivisor,Screen.height/sizeDivisor); infoWindow = new InfoWindow (Screen.width - Screen.width/sizeDivisor, Screen.height-Screen.height/sizeDivisor*3, Screen.width/sizeDivisor, Screen.height/sizeDivisor*2); }
private void Rename_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { ReadyButton.PerformClick(); } }
//切换宠物参战组回应.. private static void msg_SC_PET_TEAM_NTF(int iMsgID, ref CMessage msg) { CliProto.SC_PET_TEAM_NTF refMsg = (CliProto.SC_PET_TEAM_NTF)msg; sdNewPetMgr.Instance.mPetCurTeam = refMsg.m_Team; for (int i = 0; i < 21; i++) { sdNewPetMgr.Instance.mPetAllTeam[i] = refMsg.m_PetUUID[i]; } sdNewPetMgr.Instance.SetCurBattleTeamPetDBID(); GameObject wnd = sdGameLevel.instance.NGUIRoot; if (wnd) { sdUIPetWarPnl petWarPnl = wnd.GetComponentInChildren <sdUIPetWarPnl>(); if (petWarPnl) { petWarPnl.ReflashPetBattleTeam(); petWarPnl.RefreshPetZuhePage(); } // 需要通知关卡选择界面,切换宠物战队成功.. GameObject lp = GameObject.Find("$LevelPrepareWnd(Clone)"); if (lp != null) { ReadyButton readyBtn = lp.transform.FindChild("PrepareWnd/bt_ok").GetComponent <ReadyButton>(); readyBtn.OnChangePetTeam(); } } }
protected override void OnGamePresentationUpdate() { if (_doodelDraw.IsLastDoodleLoaded) { _screenContainer.SetActive(!SimWorld.HasSingleton <GameStartedTag>()); // Temp fix - TODO change Ready Button use and do something better // (using sim input and apply character settings directly does not work for some reason) ReadyButton readyButton = _readyButton.GetComponent <ReadyButton>(); if (readyButton != null) { if (!_settingsApplied && (Cache.LocalPawn != Entity.Null) && (readyButton.GetState() == ReadyButton.TurnState.NotReady) && _doodelDraw.IsLibraryLoaded && s_consoleSkipCharacterCreation) { _readyButton.onClick.Invoke(); } } } }
private void OnActionChanged(object sender, EventArgs e) { InformationLabel.TextColor = UIColor.DarkGray; if (_isSigningIn) { InformationLabel.Text = StringConstants.SigningInMessage; ReadyButton.SetTitle(StringConstants.SignInString, UIControlState.Normal); MacAddressTextBox.Hidden = true; FullNameTextBox.Hidden = true; MacAddressLabel.Hidden = true; FullNameLabel.Hidden = true; } else { InformationLabel.Text = StringConstants.RegisterMessage; ReadyButton.SetTitle(StringConstants.RegisterString, UIControlState.Normal); MacAddressTextBox.Hidden = false; FullNameTextBox.Hidden = false; MacAddressLabel.Hidden = false; FullNameLabel.Hidden = false; } }
private void Awake() { networker = GameObject.FindObjectOfType <Networker>(); button.onClick.AddListener(() => { // This is AI mode, the AI always approves team changes if (networker == null) { lobby?.SwapAITeam(); } else if (!networker.isHost) { // This is a client ReadyButton ready = GameObject.FindObjectOfType <ReadyButton>(); if (ready != null && ready.toggle.isOn) { ready.toggle.isOn = false; } } EventSystem.current.Deselect(); networker?.ProposeTeamChange(); }); }
private void button2_Click(object sender, EventArgs e) { if (client != null) { client.sendMessage("r+true"); if (client.ready) { Form opponentForm = new OpponentForm(client, this); opponentForm.Show(); setup = false; ReadyButton.Hide(); button_Reset.Hide(); waitingLabel.Hide(); } else { waitingLabel.Show(); } } else if (server != null) { if (server.ready) { server.sendMessage("r+true"); Form opponentForm = new OpponentForm(server, this); opponentForm.Show(); setup = false; ReadyButton.Hide(); button_Reset.Hide(); waitingLabel.Hide(); } else { waitingLabel.Show(); } } }
private void LoadReadyButton() { _readyButton = GameObject.Find("ReadyButton").GetComponent <ReadyButton>(); }
public Info() { RelativeSizeAxes = Axes.X; Height = HEIGHT; Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.FromHex(@"28242d"), }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING }, Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Padding = new MarginPadding { Vertical = 20 }, Children = new Drawable[] { new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Children = new Drawable[] { name = new OsuSpriteText { TextSize = 30, }, availabilityStatus = new OsuSpriteText { TextSize = 14, }, }, }, beatmapTypeInfo = new BeatmapTypeInfo { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, }, }, }, readyButton = new ReadyButton { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, RelativeSizeAxes = Axes.Y, Size = new Vector2(200, 1), Padding = new MarginPadding { Vertical = 10 }, }, }, }, }; }
public void StartTheGame() { Time.timeScale = 1f; ReadyButton.SetActive(false); }
void ReleaseDesignerOutlets() { if (ActionControl != null) { ActionControl.Dispose(); ActionControl = null; } if (FullNameLabel != null) { FullNameLabel.Dispose(); FullNameLabel = null; } if (FullNameTextBox != null) { FullNameTextBox.Dispose(); FullNameTextBox = null; } if (InformationLabel != null) { InformationLabel.Dispose(); InformationLabel = null; } if (MacAddressLabel != null) { MacAddressLabel.Dispose(); MacAddressLabel = null; } if (MacAddressTextBox != null) { MacAddressTextBox.Dispose(); MacAddressTextBox = null; } if (PasswordTextBox != null) { PasswordTextBox.Dispose(); PasswordTextBox = null; } if (ReadyButton != null) { ReadyButton.Dispose(); ReadyButton = null; } if (SignInView != null) { SignInView.Dispose(); SignInView = null; } if (UsernameTextBox != null) { UsernameTextBox.Dispose(); UsernameTextBox = null; } }
public void readygame() { started = true; started2 = true; ReadyButton.SetActive(false); }
void Start() { instance = this; m_button = GetComponent <Button>(); m_button.onClick.AddListener(OnClick); }
}//End UpdateScore Method //Replay Button Click Method private void ReplayButton_Click(object sender, EventArgs e) { //Resetting Game And Starting Next Game From Scratch ResetGame(); ReadyButton.PerformClick(); }//End Replay Button Click
public void Ready() { Time.timeScale = 1f; ReadyButton.SetActive(false); }