コード例 #1
0
ファイル: PlanetType.cs プロジェクト: Kevok93/SpaceGame
 public PlanetType(
     ElementId id,
     AbstractImage icon,
     string name,
     string description,
     YieldCalculator yieldCalculator
     ) : base(id, ElementType.PlanetType)
 {
     this.icon            = icon;
     this.name            = name;
     this.description     = description;
     this.yieldCalculator = yieldCalculator;
 }
コード例 #2
0
ファイル: PlanetType.cs プロジェクト: Kevok93/SpaceGame
        public static PlanetType getTestPlanetType(
            ElementId?id         = null,
            AbstractImage image  = null,
            string name          = "TestPlanetType",
            string desc          = "TestDescription",
            YieldCalculator calc = null
            )
        {
            ElementId _id = id.GetValueOrDefault(0);

            image = image ?? AbstractResourceTest.GetTestAbstractImage();
            calc  = calc ?? NULL_YIELD;
            return(TestConstructor.testBuildObject(
                       () => new PlanetType(
                           id: _id,
                           icon: image,
                           name: name,
                           description: desc,
                           yieldCalculator: calc
                           )
                       ));
        }