public void Add(ChangeMessage msg) { Messages.Add(msg); }
public void addMessage(ChangeMessage msg) { updateManager.addChangeMessage(msg); }
public void addChangeMessage(ChangeMessage msg) { messageBuffer.Add(msg); }
public override void Update(double fTimeElapsed) { base.Update(fTimeElapsed); // Handle user input Input(fTimeElapsed); // early out if no movement if (UpdateData.velocity == Vector2.Zero) return; // update position UpdateData.position += UpdateData.velocity; // Make a new message ChangeMessage msg = new ChangeMessage(); msg.ID = nId; msg.MessageType = ChangeMessageType.UpdatePosition; msg.Position = UpdateData.position; GamePlayState.Instance.addMessage(msg); UpdateData.velocity = Vector2.Zero; }