public void CreateBoxShader(Entity box, string shader) { HudElem elem = HudElem.NewTeamHudElem("allies"); elem.SetShader(shader, 20, 20); elem.Alpha = 0.6f; elem.X = box.Origin.X; elem.Y = box.Origin.Y; elem.Z = box.Origin.Z + 40f; elem.Call("SetWayPoint", new Parameter[] { 1, 1 }); }
public static HudElem BonusDropHud(string shader, float xpoint) { var icon = HudElem.NewTeamHudElem("allies"); icon.HorzAlign = "center"; icon.VertAlign = "middle"; icon.AlignX = "center"; icon.AlignY = "middle"; icon.Foreground = true; icon.SetShader(shader, 30, 30); icon.Alpha = 1; icon.Y = 200; icon.X = xpoint; return(icon); }
public static void BonusDropTakeHud(Entity player, string text, string shader) { var hud = HudElem.NewHudElem(); hud.HorzAlign = "center"; hud.VertAlign = "middle"; hud.AlignX = "center"; hud.AlignY = "middle"; hud.Font = "objective"; hud.FontScale = 2; hud.Alpha = 1; hud.Color = new Vector3(1, 1, 1); hud.GlowColor = new Vector3(1f, 0.3f, 0.3f); hud.GlowAlpha = 0.85f; hud.X = 0; hud.Y = 140; hud.Call("moveovertime", 2); hud.Call("fadeovertime", 2); hud.Y = 80; hud.Alpha = 0; var icon = HudElem.NewTeamHudElem("allies"); icon.HorzAlign = "center"; icon.VertAlign = "middle"; icon.AlignX = "center"; icon.AlignY = "middle"; icon.X = 0; icon.Y = 125; icon.Foreground = true; icon.SetShader(shader, 30, 30); icon.Alpha = 1; icon.Call("moveovertime", 2); icon.Call("fadeovertime", 2); icon.Y = 65; icon.Alpha = 0; player.AfterDelay(2000, e => { hud.Call("destroy"); icon.Call("destroy"); }); }
public static HudElem CreateShader(Vector3 origin, string shader, string team = "") { HudElem elem; if (team != "") { elem = HudElem.NewTeamHudElem(team); } else { elem = HudElem.NewHudElem(); } elem.SetShader(shader, 15, 15); elem.Alpha = 0.6f; elem.X = origin.X; elem.Y = origin.Y; elem.Z = origin.Z + 50f; elem.Call("SetWayPoint", 1, 1); return(elem); }
private HudElem CreateShader(Entity ent, string shader, string team = "") { HudElem elem; if (team != "") { elem = HudElem.NewTeamHudElem(team); } else { elem = HudElem.NewHudElem(); } elem.SetShader(shader, 15, 15); elem.Alpha = 0.6f; elem.X = ent.Origin.X; elem.Y = ent.Origin.Y; elem.Z = ent.Origin.Z + 50f; elem.Call("SetWayPoint", 1, 1); return(elem); }