コード例 #1
0
ファイル: Component.cs プロジェクト: PhoenixWright/Mystery
 public Component(Engine engine)
 {
     Engine = engine;
       Disposed = false;
       Visible = true;
       drawOrder = 0;
 }
コード例 #2
0
ファイル: Level.cs プロジェクト: PhoenixWright/Mystery
        /// <summary>
        /// Loads and manages maps.
        /// </summary>
        /// <param name="game">Game reference.</param>
        /// <param name="mapPath">The relative path to the map.</param>
        public Level(Engine engine, string mapPath)
            : base(engine)
        {
            mapFilePath = mapPath;
              Lights = new List<EffectLight>();
              levelParticleEffects = new List<ParticleEffectComponent>();

              DrawOrder = (int)Global.Layers.Background;

              Engine.AddComponent(this);
        }
コード例 #3
0
ファイル: Light.cs プロジェクト: PhoenixWright/Mystery
        public Light(Engine engine)
            : base(engine)
        {
            light = new Light2D();

              light.Texture = Engine.Lighting.PointLightTexture;

              Engine.Lighting.Krypton.Lights.Add(light);

              Engine.AddComponent(this);
        }
コード例 #4
0
        public ParticleEffectComponent(Engine engine, string effectName, Vector2 initialPosition)
            : base(engine)
        {
            DrawParticleEffect = true;
              particleEffectName = effectName;
              this.Position = initialPosition;

              particleEffect = Engine.Content.Load<ParticleEffect>(@"ParticleEffects\" + particleEffectName);
              particleEffect.LoadContent(Engine.Content);
              particleEffect.Initialise();

              DrawOrder = int.MaxValue - 1;

              Engine.AddComponent(this);
        }
コード例 #5
0
ファイル: Player.cs プロジェクト: PhoenixWright/Mystery
        public Player(Engine engine, Vector2 tilePosition)
            : base(engine, tilePosition)
        {
            DrawOrder = (int)Global.Layers.Player;

              AudioListener = new AudioListener();
              AudioListener.Position = new Vector3(Position, 0);

              light = new Light(engine);
              light.Color = Color.White;
              light.Fov = MathHelper.TwoPi;
              light.Position = Position;
              light.Range = 250;
              light.ShadowType = Krypton.Lights.ShadowType.Illuminated;

              Engine.AddComponent(this);
        }
コード例 #6
0
ファイル: GravityLight.cs プロジェクト: PhoenixWright/Mystery
 public GravityLight(Engine engine, float gravityValue)
     : base(engine)
 {
     this.gravityValue = gravityValue;
       gravityVector = new Vector2(0.0f, gravityValue);
 }
コード例 #7
0
ファイル: NullLight.cs プロジェクト: PhoenixWright/Mystery
 public NullLight(Engine engine, List<EffectLight> worldLights)
     : base(engine)
 {
     WorldLights = worldLights;
 }
コード例 #8
0
 public MovingPlatformPhysicsComponent(Engine engine, List<Vector2> gameWorldPositionList, float speed)
     : base(engine)
 {
 }
コード例 #9
0
 /// <summary>
 /// Constructs a new instance of krypton
 /// </summary>
 /// <param name="game">Your game object</param>
 /// <param name="effectAssetName">The asset name of Krypton's effect file, which must be included in your content project</param>
 public KryptonEngine(Engine engine, string effectAssetName)
     : base(engine)
 {
     this.mEffectAssetName = effectAssetName;
 }