Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes the projectile renderer
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

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

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

            this.objectAction = new ObjectAction(path);
            this.screenplay   = this.EntityManager.Find("ScreenplayManager").FindComponent <ScreenplayManager>();
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
        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>();
            }
        }
Esempio n. 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>();
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 12
0
        /// <summary>
        /// Initializes the projectile renderer
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

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