public override void Notify(ResetMessage m) { int previousCharges = currentCharges; setNumCharges(0); Callback.FireForUpdate(() => setNumCharges(previousCharges), this); }
// Update is called once per frame void Update() { //ゾンビの増殖 zombies = GameObject.FindGameObjectsWithTag("zombie"); if (zombies.Length < 4) { Instantiate(zombie, new Vector3(Random.Range(-stageWidth / 2, stageWidth / 2), 0, Random.Range(-stageHeight / 2, stageHeight / 2)), Quaternion.identity); } //HPが0になった時 if (PlayerHP <= 0) { print("YouDied"); //プレイヤーのHPがゼロの時に表示 panel.SetActive(true); messeage.SetActive(true); ResetMessage.SetActive(true); YourScore.SetActive(true); YourScore1.text = "Your Score:" + score; ////GameControllerクラスにあるクラスメソッド・FixedCameraを呼び出す。 GyroScript.FixedCamera(); //タイトルへ戻るメソッドの呼び出し Invoke("ReturnTitle", 5.0f); } }
public void OnNetworkResetMessage(ResetMessage m) { if (!this.gameRunning) { Start(this.myPlayerNumber, this.connectionToOtherPlayer); } }
//when this happens, disable all distance-emission particle effects for one frame because the player is about to teleport public override void Notify(ResetMessage m) { if (vfx.isPlaying) { vfx.Pause(); vfx.Clear(); Callback.FireForUpdate(() => vfx.Play(), this); } }
public override void Notify(ResetMessage m) //when this happens, disable all distance-emission particle effects for one frame because the player is about to teleport { if (vfx.isPlaying) { vfx.Pause(); vfx.Clear(); Callback.FireForUpdate(() => vfx.Play(), this); } }
public Form1T22D1() { InitializeComponent(); showMessageCallback = new ShowMessage(showMessage); resetMessageCallBack = new ResetMessage(resetMessage); ipaddress = IPAddress.Loopback; tbxserverIp.Text = ipaddress.ToString(); tbxPort.Text = Port.ToString(); }
protected async Task delayMessageReset() { _delayTimer = new Timer(); _delayTimer.Interval = 3000; _delayTimer.Elapsed += (o, e) => ResetMessage.Invoke(); _delayTimer.AutoReset = false; _delayTimer.Stop(); _delayTimer.Start(); await Task.CompletedTask; }
public FormClient() { InitializeComponent(); // 实例化委托 // 显示消息 showMessageCallback = new ShowMessage(showMessage); // 重置消息 resetMessageCallBack = new ResetMessage(resetMessage); }
byte[] GenerateResetMessage(bool finished) { ResetMessage msg = new ResetMessage(); msg.reward = PlayerPrefs.GetFloat("Reward"); msg.success = PlayerPrefs.GetInt("Success Count"); msg.failure = PlayerPrefs.GetInt("Failure Count"); msg.elapsed = PlayerPrefs.GetInt("Elapsed Time"); msg.finished = finished; return(packer.Pack(msg)); }
public Form1() { InitializeComponent(); //实例化委托 ShowMessageCallback = new ShowMessage(showMessage); ResetMessageCallBack = new ResetMessage(resetMessage); ipaddress = IPAddress.Loopback; txtIP.Text = ipaddress.ToString(); txtPort.Text = Port.ToString(); btnStop.Enabled = false; }
public frmSyncTCPClient() { InitializeComponent(); #region 实例化委托 // 显示消息 showMessageCallback = new ShowMessage(showMessage); // 显示状态 showStatusCallBack = new ShowStatus(showStatus); // 重置消息 resetMessageCallBack = new ResetMessage(resetMessage); #endregion }
public Form1() { InitializeComponent(); //显示消息 showMessageBack = new ShowMessage(showMessage); //清空消息 resetMessageBack = new ResetMessage(resetMessage); ipaddress = IPAddress.Loopback; txtPort.Text = ipaddress.ToString(); txtPort.Text = Port.ToString(); }
public TCPClient() { InitializeComponent(); #region 实例化委托 // 显示消息 showMessageCallback = new ShowMessage(showMessage); // 重置消息 resetMessageCallBack = new ResetMessage(resetMessage); #endregion ipaddress = IPAddress.Loopback; tbxserverIp.Text = ipaddress.ToString(); tbxPort.Text = Port.ToString(); }
public FormServer() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false;//设置该属性 为false // 实例化委托 // 显示消息 showMessageCallback = new ShowMessage(showMessage); // 重置消息 resetMessageCallBack = new ResetMessage(resetMessage); //ipAddress = IPAddress.Parse("10.161.103.59"); ipAddress = IPAddress.Parse("127.0.0.1"); port = Int32.Parse(tsTextBox2.Text); }
public frmSyncTcpServer() { InitializeComponent(); #region 实例化委托 // 显示消息 showMessageCallback = new ShowMessage(showMessage); // 显示状态 showStatusCallBack = new ShowStatus(showStatus); // 重置消息 resetMessageCallBack = new ResetMessage(resetMessage); #endregion ipaddress = IPAddress.Loopback; tbxserverIp.Text = ipaddress.ToString(); tbxPort.Text = Port.ToString(); }
/// <summary> /// Send VOD seek control message /// </summary> /// <param name="msgIn">Message input</param> /// <param name="position">New timestamp to play from</param> private void SendVODSeekCM(IMessageInput msgIn, int position) { OOBControlMessage oobCtrlMsg = new OOBControlMessage(); oobCtrlMsg.Target = typeof(ISeekableProvider).Name; oobCtrlMsg.ServiceName = "seek"; oobCtrlMsg.ServiceParameterMap.Add("position", position); msgIn.SendOOBControlMessage(this, oobCtrlMsg); lock (this.SyncRoot) { // Reset properties _vodStartTS = 0; _serverStartTS = System.Environment.TickCount; if (_nextRTMPMessage != null) { try { PushMessage(_nextRTMPMessage); } catch (IOException ex) { log.Error("Error while sending message.", ex); } _nextRTMPMessage = null; } ResetMessage reset = new ResetMessage(); try { PushMessage(reset); } catch (IOException ex) { log.Error("Error while sending message.", ex); } ScheduleNextMessage(); } }
public abstract void Notify(AbilityStateChangedMessage m); //update our display state public abstract void Notify(ResetMessage m); //when this happens, disable all distance-emission particle effects for one frame because the player is about to teleport
public Task SendResetMessage(ResetMessage message) { return(this.SendMessage(message)); }
public void OnResetRequested(ResetMessage message) { state.Reset(); board.Reset(); }
public void Notify(ResetMessage m) { cooldownCountdown.Stop(); ready = true; Reset(m.timeTillActive); }
void msiInterface_InstallerMessageReceived(object sender, InstallerMessageEventArgs e) { string message = string.Empty; if (e.InstallerMessage.Type == InstallerMessageType.ProgressReport) { message = ((ProgressReportMessage)e.InstallerMessage).ToString(); if (reset) { ProgressReportMessage progressReportMessage = (ProgressReportMessage)e.InstallerMessage; if (approximate && progressBar1.Maximum < (progressBar1.Value + progressReportMessage.TicksMoved)) { return; } progressBar1.Value += (int)progressReportMessage.TicksMoved; AddText("MsiInstall: Moved = " + (int)progressReportMessage.TicksMoved + " Progress = " + progressBar1.Value); } } else if (e.InstallerMessage.Type == InstallerMessageType.ResetMessage) { reset = false; message = ((ResetMessage)e.InstallerMessage).ToString(); AddText("MsiInstall: Reset ticks: " + ((ResetMessage)e.InstallerMessage).Ticks); // set progress bar properties ResetMessage resetMessage = (ResetMessage)e.InstallerMessage; progressBar1.Maximum = (int)resetMessage.Ticks; progressBar1.Minimum = 0; progressBar1.Step = 1; progressBar1.Value = 0; approximate = resetMessage.IsApproximate; AddText("MsiInstall: Reset done: value = " + progressBar1.Value + " max=" + progressBar1.Maximum); reset = true; } else if (e.InstallerMessage.Type == InstallerMessageType.ActionData) { AddText("MsiInstall: Action Data message =" + ((ActionDataMessage)e.InstallerMessage).Message); SetLabel(((ActionDataMessage)e.InstallerMessage).Message); //Globals.Instance.MsiInterface.SetUserAction(MsiResponse.Cancel); } else if (e.InstallerMessage.Type == InstallerMessageType.ActionStart) { ActionStartMessage actionStartMessage = (ActionStartMessage)e.InstallerMessage; AddText("MsiInstall: Action start message: action=" + actionStartMessage.Action + " desc=" + actionStartMessage.Description + " time=" + actionStartMessage.Time); SetLabel(actionStartMessage.Action + ": " + actionStartMessage.Description); } else if (e.InstallerMessage.Type == InstallerMessageType.FileInUse) { MsiResponse userAction = (MsiResponse)MessageBox.Show("file in use:" + ((FileInUseMessage)e.InstallerMessage).FilePath, "File in use", MessageBoxButtons.AbortRetryIgnore); Globals.Instance.MsiInterface.SetUserAction(userAction); } else if (e.InstallerMessage.Type == InstallerMessageType.InstallationComplete) { SetLabel("Installation Completed"); btnCancel.Enabled = false; btnBack.Enabled = false; } AddText("MsiInstall: " + message); }
public override void Notify(ResetMessage m) //when this happens, disable all distance-emission particle effects for one frame because the player is about to teleport { }