Esempio n. 1
0
        /// <summary>
        /// Creates the scene.
        /// </summary>
        /// <remarks>
        /// This method is called before all <see cref="T:WaveEngine.Framework.Entity" /> instances in this instance are initialized.
        /// </remarks>
        protected override void CreateScene()
        {
            Entity camera = new Entity()
                            .AddComponent(new Camera2D());

            EntityManager.Add(camera);

            this.RenderManager.RegisterLayerAfter(new ObstaclesLayer(this.RenderManager), DefaultLayers.Alpha);

            // Game Entities
            this.CreateBackground();
            this.CreateKite();
            this.CreateObstacles();

            this.crashEffect = EntitiesFactory.CreateCrashEffect();
            this.EntityManager.Add(this.crashEffect);

            // UI
            this.currentScoreTB = EntitiesFactory.CreateCurrentScore(40);
            this.EntityManager.Add(this.currentScoreTB);

#if DEBUG
            this.AddSceneBehavior(new DebugSceneBehavior(), SceneBehavior.Order.PreUpdate);
#endif
        }
Esempio n. 2
0
 public Monster(int id, string name, string model, bool isShow, bool isMiss, bool isDrop, bool isAffect, int dieeffect, int disapperWay, int dropEffect, int crashEffect)
 {
     this.id          = id;
     this.Name        = name;
     this.model       = model;
     this.hpShow      = isShow;
     this.miss        = isMiss;
     this.drop        = isDrop;
     this.affect      = isAffect;
     this.dieEffect   = dieeffect;
     this.disapperWay = (DisapperWay)disapperWay;
     this.dropEffect  = (DropEffect)dropEffect;
     this.crashEffect = (CrashEffect)crashEffect;
 }