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