Esempio n. 1
0
        public static ISceneObject SpectatorActionReadinessIndicator(ISpectatorAction a, MiningModule parent, double rotation, Color begin, Color end, Color stroke)
        {
            SimpleSphere s = new SimpleSphere(a.SceneMgr, IdMgr.GetNewId(a.SceneMgr.GetCurrentPlayer().GetId()));

            s.Color    = a.CastingColor;
            s.Radius   = 6;
            s.Category = DrawingCategory.PLAYER_OBJECTS;

            Vector offset = new Vector(parent.Radius + 15, 0).Rotate(rotation);

            s.SetGeometry(SceneGeometryFactory.CreateRadialGradientEllipseGeometry(a.SceneMgr, s.Radius, begin, end, stroke, parent.Center + offset, 1));

            CenterCloneControl ccc = new CenterCloneControl(parent);

            ccc.Offset = offset;
            s.AddControl(ccc);

            return(s);
        }
Esempio n. 2
0
        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);
        }