added: revive ui bar
This commit is contained in:
@@ -149,6 +149,29 @@ namespace Reset.Units{
|
||||
Color.orchid);
|
||||
}
|
||||
}
|
||||
|
||||
[Rpc(SendTo.Everyone)]
|
||||
public void DrawReviveBarRpc(float elapsedTime){
|
||||
Debug.Log("test is drawn");
|
||||
using (Draw.ingame.WithLineWidth(5f)) {
|
||||
using (Draw.InLocalSpace(transform)){
|
||||
float width = .9f;
|
||||
float widthDone = width * elapsedTime / 5f;
|
||||
|
||||
widthDone = Mathf.Clamp(widthDone, 0, width);
|
||||
|
||||
Vector3 pos = Vector3.up * 1.8f + Vector3.left * width + Vector3.forward * .01f;
|
||||
Draw.ingame.Line(Camera.main.transform.rotation * pos, Camera.main.transform.rotation *
|
||||
(pos + Vector3.right * width * 2f), Color.rebeccaPurple);
|
||||
|
||||
Vector3 donePos = Vector3.up * 1.8f + Vector3.left * widthDone;
|
||||
Draw.ingame.Line(Camera.main.transform.rotation * donePos, Camera.main.transform.rotation *
|
||||
(donePos + Vector3.right * widthDone * 2f), Color.red);
|
||||
}
|
||||
}
|
||||
|
||||
lastKnownReviveTime = elapsedTime;
|
||||
}
|
||||
|
||||
void LateUpdate(){
|
||||
// Clear the pickupTarget every frame
|
||||
|
||||
Reference in New Issue
Block a user