public static BaseIntegrityBar CreateBaseIntegrityBar(SceneMgr mgr, Player owner) { BaseIntegrityBar arc = new BaseIntegrityBar(mgr, IdMgr.GetNewId(mgr.GetCurrentPlayer().GetId())); Color c = owner.GetPlayerColor(); c.A = 0x55; arc.Color = c; arc.FullAngle = (float)Math.PI; arc.Width = (float)owner.Baze.Size.Width / 2 + 2; arc.Height = (float)owner.Baze.Size.Height + 3; //hack kvuli neeliptickym rozmerum baze arc.Position = owner.Baze.Position + (new Vector(owner.Baze.Size.Width / 2, owner.Baze.Size.Height)); arc.StartPoint = new Point(0, owner.Baze.Size.Height + 3); arc.SetGeometry(SceneGeometryFactory.CreateArcSegments(arc)); return(arc); }
public static MiningModuleIntegrityBar CreateMiningModuleIntegrityBar(SceneMgr mgr, MiningModule module, Player owner) { MiningModuleIntegrityBar arc = new MiningModuleIntegrityBar(mgr, IdMgr.GetNewId(mgr.GetCurrentPlayer().GetId())); arc.Color = owner.Data.SpecialColor; arc.Radius = module.Radius + 5; CenterCloneControl pControl = new CenterCloneControl(module); arc.AddControl(pControl); HpBarControl hControl = new HpBarControl(arc); module.AddControl(hControl); arc.SetGeometry(SceneGeometryFactory.CreateArcSegments(arc)); return(arc); }