Change LocalPlayerJump -> LocalPlayerAction
This commit is contained in:
parent
d33028047e
commit
0bcc31093c
@ -151,9 +151,9 @@ namespace NeonTea.Quakeball.Networking.Instances {
|
||||
}
|
||||
}
|
||||
|
||||
public override void LocalPlayerJump() {
|
||||
public override void LocalPlayerAction(PlayerAction action) {
|
||||
if (SelfIdentified && Server != null) {
|
||||
PlayerActionPckt jump = new PlayerActionPckt();
|
||||
PlayerActionPckt jump = new PlayerActionPckt(action);
|
||||
Peer.SendReliable(Server.uid, jump);
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace NeonTea.Quakeball.Networking.Instances {
|
||||
|
||||
public abstract void UpdateLocalPlayer();
|
||||
public abstract void SendPlayerSync();
|
||||
public abstract void LocalPlayerJump();
|
||||
public abstract void LocalPlayerAction(PlayerAction action);
|
||||
|
||||
public virtual void Update() { }
|
||||
|
||||
|
@ -175,8 +175,8 @@ namespace NeonTea.Quakeball.Networking.Instances {
|
||||
SendUnreliableToAll(pckt);
|
||||
}
|
||||
|
||||
public override void LocalPlayerJump() {
|
||||
PlayerActionPckt jump = new PlayerActionPckt(PlayerAction.Jump, LocalPlayer.Id);
|
||||
public override void LocalPlayerAction(PlayerAction action) {
|
||||
PlayerActionPckt jump = new PlayerActionPckt(action, LocalPlayer.Id);
|
||||
SendReliableToAll(jump);
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ namespace NeonTea.Quakeball.Players {
|
||||
if (WantsToJump) {
|
||||
bool Jumped = Player.Jump();
|
||||
if (Jumped && Networking.Net.Singleton.Instance != null) {
|
||||
Networking.Net.Singleton.Instance.LocalPlayerJump();
|
||||
Networking.Net.Singleton.Instance.LocalPlayerAction(PlayerAction.Jump);
|
||||
}
|
||||
}
|
||||
WantsToJump = false;
|
||||
|
Loading…
Reference in New Issue
Block a user