예제 #1
0
        /// <summary>
        /// Initializes the radar behavior
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent<ScreenplayManager>();

            foreach (var fighter in this.screenplay.FighterList)
            {
                if (fighter.State == FighterState.Player)
                {
                    continue;
                }

                Transform3D radarTickTransform;
                BasicMaterial radarTickMaterial;
                Entity radarTick = new Entity()
                .AddComponent(radarTickTransform = new Transform3D())
                .AddComponent(new Model("Content/Models/Hud/HudRadarTick.FBX"))
                .AddComponent(new ModelRenderer())
                .AddComponent(new MaterialsMap(radarTickMaterial = new BasicMaterial("Content/Textures/Hud/RadarTick.png", typeof(CockpitAdditiveLayer))
                    {
                        DiffuseColor = colors[(int)fighter.State]
                    }))
                ;

                radarTick.Enabled = false;

                this.Owner.AddChild(radarTick);
                this.radarTicks.Add(radarTickTransform);
                this.radarTickMaterials.Add(radarTickMaterial);
            }
        }
예제 #2
0
        /// <summary>
        /// Initializes the radar behavior
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent <ScreenplayManager>();

            foreach (var fighter in this.screenplay.FighterList)
            {
                if (fighter.State == FighterState.Player)
                {
                    continue;
                }

                Transform3D      radarTickTransform;
                StandardMaterial radarTickMaterial;
                Entity           radarTick = new Entity()
                                             .AddComponent(radarTickTransform = new Transform3D())
                                             .AddComponent(new Model("Content/Models/Hud/HudRadarTick.FBX"))
                                             .AddComponent(new ModelRenderer())
                                             .AddComponent(new MaterialsMap(radarTickMaterial = new StandardMaterial(typeof(CockpitAdditiveLayer), "Content/Textures/Hud/RadarTick.png")
                {
                    DiffuseColor = colors[(int)fighter.State]
                }))
                ;

                radarTick.Enabled = false;

                this.Owner.AddChild(radarTick);
                this.radarTicks.Add(radarTickTransform);
                this.radarTickMaterials.Add(radarTickMaterial);
            }
        }
예제 #3
0
        /// <summary>
        /// Initializes the projectile renderer
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent <ScreenplayManager>();
            this.BuildMesh();
        }
예제 #4
0
        protected override void Initialize()
        {
            base.Initialize();

            this.objectAction = new ObjectAction(path);
            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent<ScreenplayManager>();
        }
예제 #5
0
        protected override void Initialize()
        {
            base.Initialize();

            this.objectAction = new ObjectAction(path);
            this.screenplay   = this.EntityManager.Find("ScreenplayManager").FindComponent <ScreenplayManager>();
        }
예제 #6
0
        /// <summary>
        /// Initializes the behavior
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.objectPath = new ObjectPath(path, this.offsetRotation);
            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent <ScreenplayManager>();

            this.screenplay.StartFrame = Math.Min(this.objectPath.Start, this.screenplay.StartFrame);
            this.screenplay.EndFrame   = Math.Max(this.objectPath.End, this.screenplay.EndFrame);
        }
예제 #7
0
        /// <summary>
        /// Initializes the behavior
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.objectPath = new ObjectPath(path, this.offsetRotation);
            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent<ScreenplayManager>();

            this.screenplay.StartFrame = Math.Min(this.objectPath.Start, this.screenplay.StartFrame);
            this.screenplay.EndFrame = Math.Max(this.objectPath.End, this.screenplay.EndFrame);
        }
예제 #8
0
        protected override void Initialize()
        {
            base.Initialize();

            this.objectAction = new ObjectAction(path);

            var screenPlayEntity = this.EntityManager.Find("ScreenplayManager");
            if (screenPlayEntity != null)
            {
                this.screenplay = screenPlayEntity.FindComponent<ScreenplayManager>();
            }
        }
예제 #9
0
        protected override void Initialize()
        {
            base.Initialize();

            this.objectAction = new ObjectAction(path);

            var screenPlayEntity = this.EntityManager.Find("ScreenplayManager");

            if (screenPlayEntity != null)
            {
                this.screenplay = screenPlayEntity.FindComponent <ScreenplayManager>();
            }
        }
예제 #10
0
        /// <summary>
        /// Initializes the behavior
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.objectPath = new ObjectPath(path, this.OffsetOrientation);

            var screenPlayEntity = this.EntityManager.Find("ScreenplayManager");

            if (screenPlayEntity != null)
            {
                this.screenplay            = screenPlayEntity.FindComponent <ScreenplayManager>();
                this.screenplay.StartFrame = Math.Min(this.objectPath.Start, this.screenplay.StartFrame);
                this.screenplay.EndFrame   = Math.Max(this.objectPath.End, this.screenplay.EndFrame);
            }
        }
예제 #11
0
        /// <summary>
        /// Initializes the behavior
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.objectPath = new ObjectPath(path, this.OffsetOrientation);

            var screenPlayEntity = this.EntityManager.Find("ScreenplayManager");
            if (screenPlayEntity != null)
            {
                this.screenplay = screenPlayEntity.FindComponent<ScreenplayManager>();
                this.screenplay.StartFrame = Math.Min(this.objectPath.Start, this.screenplay.StartFrame);
                this.screenplay.EndFrame = Math.Max(this.objectPath.End, this.screenplay.EndFrame);
            }
        }
예제 #12
0
        /// <summary>
        /// Initializes the projectile renderer
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent<ScreenplayManager>();
            this.BuildMesh();
        }