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