コード例 #1
0
ファイル: GameColors.cs プロジェクト: uu3474/networkgame
        public GameColors(GameCommon common)
        {
            this.ButtonText      = Color.White;
            this.ButtonBack      = Color.Black;
            this.ButtonBackAlpha = 0.2f;

            this.LabelBack      = Color.Black;
            this.LabelBackAlpha = 0.1f;

            this.Background = common.OpeningContent.BackgroundColor;

            this.SignalBackground      = new Color(this.Background.R - 4, this.Background.G - 4, this.Background.B - 4);
            this.SignalBackgroundAlpha = 1f;

            this.Substrate               = Color.White;
            this.SubstrateAlpha          = 0.03f;
            this.SubstrateAlphaMouseOver = 0.1f;

            this.WireDisconnected    = new Color(140, 176, 161);
            this.WireConnected       = new Color(245, 238, 210);
            this.DisplayDisconnected = Color.Gray;
            this.DisplayConnected    = Color.CornflowerBlue;

            this.Router     = Color.White;
            this.RouterIcon = Color.Gray;

            this.DifficultColors = new[]
            {
                Color.ForestGreen,
                Color.Yellow,
                Color.DarkOrange,
                Color.DarkRed,
            };
        }
コード例 #2
0
        public GameTextures(GameCommon common)
        {
            var prefix = common.SizeChooser.SizeMultiplierPrefix;

            this.MainLogo             = common.Manager.Load <Texture2D>($"{prefix}/main_logo");
            this.BackgroundSignalPart = common.Manager.Load <Texture2D>($"{prefix}/background_signal_part");
            this.LoadingScreenSpinner = common.Manager.Load <Texture2D>($"{prefix}/loading_screen_spinner");
            this.MenuIcon             = common.Manager.Load <Texture2D>($"{prefix}/menu_icon");

            this._menuAtlas   = new Atlas(common.Manager, $"{prefix}/menuAtlas", $"{prefix}/menuAtlasDesc");
            this.Pixel2       = this._menuAtlas["pixel2"];
            this.ButtonCircle = this._menuAtlas["button_circle"];

            this._fieldAtlas = new Atlas(common.Manager, $"{prefix}/fieldAtlas", $"{prefix}/fieldAtlasDesc");
            this.WireAngle2  = this._fieldAtlas["wire_angle_2"];
            this.WireAngle3  = this._fieldAtlas["wire_angle_3"];
            this.WireAngle4  = this._fieldAtlas["wire_angle_4"];
            this.WireEnd     = this._fieldAtlas["wire_end"];
            this.WireLine    = this._fieldAtlas["wire_line"];

            this._fieldHeadersAtlas = new Atlas(common.Manager, $"{prefix}/fieldHeadersAtlas", $"{prefix}/fieldHeadersAtlasDesc");
            this.DisplayBack        = this._fieldHeadersAtlas["display_back"];
            this.DisplayFront       = this._fieldHeadersAtlas["display_front"];
            this.DisplayGlobe       = this._fieldHeadersAtlas["display_globe"];
            this.DisplaySpinner     = this._fieldHeadersAtlas["display_spinner"];
        }
コード例 #3
0
 public GameEffects(GameCommon common)
 {
     if (common.UseAdvancedEffects)
     {
         this.LongShadow = common.Manager.Load <Effect>("common/long_shadow");
     }
 }
コード例 #4
0
ファイル: GameAnimations.cs プロジェクト: uu3474/networkgame
        public GameAnimations(GameCommon common, GameColors colors)
        {
            this.Press10 = new RelativePercentScaleAnimation(-0.1f, -0.1f, DefaultDurationX2, Functions.RoundtripQuad);

            this.ZoomOut20 = new FixedScaleAnimation(1f, 0.8f, 1f, 0.8f, DefaultDurationX2);
            this.ZoomIn20  = new FixedScaleAnimation(1f, 1.2f, 1f, 1.2f, DefaultDurationX2);

            this.FadeIn            = new FixedFadeAnimation(0f, 1f, DefaultDurationX2);
            this.FirstScreenFadeIn = new FixedFadeAnimation(0f, 1f, DefaultDuration * 6);
            this.FadeToModal       = new FixedFadeAnimation(1, 0.05f, DefaultDurationX2);
            this.FadeOutFromModal  = new FixedFadeAnimation(0.05f, 0, DefaultDurationX2);

            this.DisplaySpinner = new InfinitySpinnerAnimation(MathHelper.TwoPi / 8, DefaultDuration);

            this.FieldPress10 = new RelativePercentScaleAnimation(-0.1f, -0.1f, DefaultDurationX2, Functions.RoundtripQuad, manager: Field.FieldManager);

            this.FieldRotate90 = new RelativeRotateAnimation(MathHelper.PiOver2, DefaultDurationX2, manager: Field.FieldManager);

            this.FieldDisplaySpinner = new InfinitySpinnerAnimation(MathHelper.TwoPi / 8, DefaultDuration, manager: Field.FieldManager);
            this.FieldFlip           = new InfinityFlipAnimation(DefaultDurationX2, DefaultDurationX2 * 5, manager: Field.FieldManager);

            this.FieldWireToConnected = new FixedColorAnimation(colors.WireDisconnected, colors.WireConnected,
                                                                DefaultDurationX2, containerType: ContainerType.Dictionary, manager: Field.FieldManager);
            this.FieldDisplayToConnected = new FixedColorAnimation(colors.DisplayDisconnected, colors.DisplayConnected,
                                                                   DefaultDurationX2, containerType: ContainerType.Dictionary, manager: Field.FieldManager);
        }
コード例 #5
0
        public GameFonts(GameCommon common)
        {
            var prefix = common.SizeChooser.SizeMultiplierPrefix;

            this.ButtonFont = new GameFont()
            {
                Font           = common.Manager.Load <SpriteFont>(prefix + "/button_font"),
                BaselineOffset = 2
            };
            this.FieldStatusFont = new GameFont()
            {
                Font           = common.Manager.Load <SpriteFont>(prefix + "/field_status_font"),
                BaselineOffset = 1
            };
        }