Ejemplo n.º 1
0
		private void button1_Click_1(object sender, EventArgs e)
		{
			if (listBoxLevels.SelectedIndex > -1)
			{ //Прежде чем забрать машину, надо выбирать с какого уровня будем забирать
				string level = listBoxLevels.Items[listBoxLevels.SelectedIndex].ToString();
				if (maskedTextBox1.Text != "")
				{
					try
					{
						ITechnique plane = parking.GetPlaneInParking(Convert.ToInt32(maskedTextBox1.Text));
						Bitmap bmp = new Bitmap(pictureBox2.Width, pictureBox2.Height);
						Graphics gr = Graphics.FromImage(bmp);
						plane.setPosition(0, 0);
						plane.drawBombardir(gr);
						pictureBox2.Image = bmp;
						Draw();
						log.Info("Забрали с места: " + Convert.ToInt32(maskedTextBox1.Text));
					}
					catch (ParkingIndexOutOfRangeException ex)
					{
						MessageBox.Show(ex.Message, "Неверный номер",
							MessageBoxButtons.OK, MessageBoxIcon.Error);
					}
					catch (Exception ex)
					{
						MessageBox.Show(ex.Message, "Общая ошибка",
							MessageBoxButtons.OK, MessageBoxIcon.Error);
					}
				}
			}
		}
Ejemplo n.º 2
0
        private void Transport_Click(object sender, EventArgs e)
        {
            inter = new Plane(maxSpeed, maxCountPass, weight, color);
            Bitmap   bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            Graphics gr  = Graphics.FromImage(bmp);

            inter.drawBombardir(gr);
            pictureBox1.Image  = bmp;
            ButtonBomb.Enabled = false;
        }
Ejemplo n.º 3
0
 private void ButtonBomb_Click(object sender, EventArgs e)
 {
     if (checkFields())
     {
         inter = new Bombardir(maxSpeed, maxCountPass, weight, color, checkBox1.Checked, checkBox2.Checked, dopColor);
         Bitmap   bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
         Graphics gr  = Graphics.FromImage(bmp);
         inter.giveBomb(gr);
         pictureBox1.Image = bmp;
     }
 }
Ejemplo n.º 4
0
        public static Missile CreateMissile(LauncherController LaunHandler)
        {
            string type = UserInputValidator.ReadMissileTypeName("Which Type of missile would you like to create?");

            LauncherMenuRunner.ShowTechniquesMenu(LaunHandler.Launcher);
            ITechnique tech = UserInputValidator.GetChoiceOfDictionary <int, ITechnique>(LaunHandler.Launcher.LaunchTechniques);

            while (tech.TargetMissile != type)
            {
                Console.WriteLine($"The technique does not fit to {type} missile, please choose the currect on:");
                tech = UserInputValidator.GetChoiceOfDictionary <int, ITechnique>(LaunHandler.Launcher.LaunchTechniques);
            }
            return(CreateMissile(type, tech));
        }
Ejemplo n.º 5
0
        private void panel1_DragDrop(object sender, DragEventArgs e)
        {
            switch (e.Data.GetData(DataFormats.Text).ToString())
            {
            case "Plane":
                plane = new Plane(100, 4, 500, Color.White);
                break;

            case "Bombardir":
                plane = new Bombardir(100, 4, 500, Color.White, true, true, true, Color.Black);
                break;
            }
            DrawPlane();
        }
        public void AddTechnique(ITechnique technique)
        {
            int lastDictKey;

            try
            {
                lastDictKey = Launcher.LaunchTechniques.Keys.Last();
                lastDictKey++;
            }
            catch (InvalidOperationException)
            {
                lastDictKey = 1;
            }
            Launcher.LaunchTechniques.Add(lastDictKey, technique);
        }
Ejemplo n.º 7
0
 private void AddPlane(ITechnique plane)
 {
     if (plane != null)
     {
         int place = parking.PutPlaneInParking(plane);
         if (place > -1)
         {
             Draw();
             MessageBox.Show("Ваше место: " + place);
         }
         else
         {
             MessageBox.Show("Технику не удалось поставить");
         }
     }
 }
Ejemplo n.º 8
0
        public FormSelectCar()
        {
            InitializeComponent();
            panel2.MouseDown += panelColor_MouseDown;
            panel3.MouseDown += panelColor_MouseDown;
            panel4.MouseDown += panelColor_MouseDown;
            panel5.MouseDown += panelColor_MouseDown;
            panel6.MouseDown += panelColor_MouseDown;
            panel7.MouseDown += panelColor_MouseDown;
            panel8.MouseDown += panelColor_MouseDown;
            panel9.MouseDown += panelColor_MouseDown;

            buttonCancel.Click += (object sender, EventArgs e) => {
                plane = null;
                Close();
            };
        }
        /// <summary>
        /// Renders a renderable object using a given technique
        /// </summary>
        public void ApplyTechnique( ITechnique technique, IRenderable renderable )
        {
            if ( renderable == null )
            {
                return;
            }

            if ( GlobalTechnique != null )
            {
                if ( technique != null )
                {
                    if ( technique.Effect != null )
                    {
                        //  GlobalTechnique and technique exist. technique is part of an effect group. Apply a substitute to GlobalTechnique
                        technique.Effect.SubstituteTechnique( GlobalTechnique ).Apply( this, renderable );
                    }
                    else if ( technique.IsSubstituteFor( GlobalTechnique ) )
                    {
                        //  GlobalTechnique and technique exist. technique is a substitute for GlobalTechnique. Apply technique
                        technique.Apply( this, renderable );
                    }
                    else
                    {
                        //  GlobalTechnique and technique exist. technique is not a substitute for GlobalTechnique. Apply GlobalTechnique
                        GlobalTechnique.Apply( this, renderable );
                    }
                }
                else
                {
                    //  GlobalTechnique exists, technique was null. Apply GlobalTechnique
                    GlobalTechnique.Apply( this, renderable );
                }
            }
            else if ( technique != null )
            {
                //  GlobalTechnique doesn't exist, technique does. Apply technique
                technique.Apply( this, renderable );
            }
            else
            {
                //  Neither GlobalTechnique or technique exist. Render object directly
                renderable.Render( this );
            }
        }
Ejemplo n.º 10
0
        public static Missile CreateMissile(string missileType, ITechnique technique)
        {
            switch (missileType)
            {
            case "Torpedo":
                return(new Torpedo(missileType, technique));

            case "Cruise":
                return(new Cruise(missileType, technique));

            case "Balistic":
                return(new Balistic(missileType, technique));

            case "LongDistance":
                return(new LongDistance(missileType, technique));

            default:
                return(null);
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Eliminate a possible value from this square.
        /// </summary>
        /// <param name="pValue">The value to eliminate.</param>
        /// <param name="pTechnique">The technique used to eliminate the value.</param>
        public void EliminatePossibility(char pValue, ITechnique pTechnique)
        {
            // Remove the value and update the technique rank if necessary
            var value = mValues[pValue];

            value.Techniques.Add(pTechnique);
            if (value.TechRank > pTechnique.Rank)
            {
                value.TechRank = pTechnique.Rank;
            }

            // If there is only one value left for the square then generate a method
            if (PossibleValues.Count() == 1)
            {
                var foundValue = PossibleValues.Single();
                AddMethod(foundValue, Method.CreateOnlyValue(foundValue, this));
            }

            mEntities.ForEach(e => e.EliminatePossibility(pValue, this));
        }
Ejemplo n.º 12
0
        private void AddPlane(ITechnique plane)
        {
            if (plane != null)
            {
				try
				{
					int place = parking.PutPlaneInParking(plane);
					Draw();
					log.Info("Добавление на место: " + place);
					MessageBox.Show("Ваше место: " + place);
				}
				catch (ParkingOverflowException ex)
				{
					MessageBox.Show(ex.Message, "Ошибка переполнения",
					MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
				catch (Exception ex)
				{
					MessageBox.Show(ex.Message, "Общая ошибка",
					MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Builds the star box (dome, sphere, thing)
        /// </summary>
        public StarBox( )
        {
            EffectAssetHandle effect = new EffectAssetHandle( "Effects/Planets/stars.cgfx", false );
            m_Technique = new TechniqueSelector( effect, "DefaultTechnique" );

            Draw.ISurface surface = Graphics.Draw.NewSurface( Graphics.Draw.NewBrush( Color.Black ), null );
            surface.FaceBrush.State.CullFaces = false;
            surface.FaceBrush.State.DepthWrite = false;
            surface.FaceBrush.State.DepthTest = false;

            Graphics.Draw.StartCache( );
            Graphics.Draw.Sphere( surface, Point3.Origin, 100, 10, 10 );
            m_Box = Graphics.Draw.StopCache( );

            m_Texture = Graphics.Factory.CreateCubeMapTexture( );
            LoadStarBoxTextures( m_Texture, "Star Fields/Default/" );

            //int imageIndex = 0;
            //foreach ( Bitmap bmp in m_Texture.ToBitmaps( ) )
            //{
            //    bmp.Save( "StarBoxCubeMapFace" + imageIndex++ + ".bmp", ImageFormat.Bmp );
            //}
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Inserts a value into this square.
        /// </summary>
        /// <param name="pValue">The value to insert.</param>
        public void InsertValue(char pValue)
        {
            if (Filled)
            {
                return;
            }

            Filled = true;

            // Prepare entities for insertion
            mEntities.ForEach(e => e.PreInsertion(pValue));

            // Remove all possible values from this square since it is now occupied
            ITechnique tech = Technique.CreateOccupiedTechnique(pValue, Index);

            foreach (char value in Constants.ALL_VALUES)
            {
                EliminatePossibility(value, tech);
            }

            // Insert the value into the entities
            mEntities.ForEach(e => e.StartInsertion(Index));
            mEntities.ForEach(e => e.EndInsertion());
        }
Ejemplo n.º 15
0
 public Earth(ITechnique attack, int extraDamage, string modifierText) : base(attack)
 {
     ExtraDamage  = extraDamage;
     ModifierText = modifierText;
 }
 /// <summary>
 /// Returns true if this technique is a substitude for another
 /// </summary>
 public bool IsSubstituteFor( ITechnique technique )
 {
     return Name == technique.Name;
 }
 /// <summary>
 /// Calls a rendering method using a given technique
 /// </summary>
 /// <param name="technique">Technique to render with</param>
 /// <param name="render">Render method delegate</param>
 /// <remarks>
 /// Equivalent to <see cref="ITechnique.Apply(IRenderContext,RenderDelegate)"/>. Differs in that if technique is a valid substitute to the 
 /// global technique (<see cref="GlobalTechnique"/>), technique is used to render the object, otherwise, the
 ///  global technique is used.
 /// </remarks>
 public void ApplyTechnique( ITechnique technique, RenderDelegate render )
 {
     m_InnerContext.ApplyTechnique( technique, render );
 }
Ejemplo n.º 18
0
 public Cruise(ITechnique technique = null)
 {
     Technique  = technique ?? new ProbabilityTwentyTechnique();
     RocketType = RocketType.Cruise;
     TryLaunch  = false;
 }
Ejemplo n.º 19
0
 public Matcher(ITechnique technique)
 {
     _technique = technique;
 }
 public Ballistic(ITechnique technique = null)
 {
     Technique  = technique ?? new ProbabilityFiftyTechnique();
     RocketType = RocketType.Ballistic;
     TryLaunch  = false;
 }
Ejemplo n.º 21
0
 public void ChangeTechnique(ITechnique technique)
 {
     LaunchTechnique = technique;
 }
Ejemplo n.º 22
0
        /// <summary>
        /// Disposes of the viewer and its components
        /// </summary>
        public void Dispose( )
        {
            Dispose( m_FpsDisplay );
            Dispose( m_Camera );
            Dispose( m_Renderable );
            Dispose( m_Technique );

            m_Control		= null;
            m_FpsDisplay	= null;
            m_Camera		= null;
            m_Renderable	= null;
            m_Technique		= null;
        }
Ejemplo n.º 23
0
 public Cruise(string missileType, ITechnique launchTechnique) : base(launchTechnique)
 {
     MissileType = "Cruise";
 }
Ejemplo n.º 24
0
 public LongDistance(string missileType, ITechnique launchTechnique) : base(launchTechnique)
 {
     MissileType = "LongDistance";
 }
        public PlanetTerrainRenderer( )
        {
            IEffect effect = ( IEffect )AssetManager.Instance.Load( "Effects/Planets/terrestrialPlanetTerrain.cgfx" );
            TechniqueSelector selector = new TechniqueSelector( effect, "DefaultTechnique" );

            m_PlanetTerrainTechnique = selector;

            float hDim = 1;
            Point3[] cubePoints = new Point3[]
                {
                    new Point3( -hDim, -hDim, -hDim ),
                    new Point3( +hDim, -hDim, -hDim ),
                    new Point3( +hDim, +hDim, -hDim ),
                    new Point3( -hDim, +hDim, -hDim ),

                    new Point3( -hDim, -hDim, +hDim ),
                    new Point3( +hDim, -hDim, +hDim ),
                    new Point3( +hDim, +hDim, +hDim ),
                    new Point3( -hDim, +hDim, +hDim ),
                };
            int res = 3;
            int defaultLodLevel = 0;
            CubeSide[] sides = new CubeSide[ ]
                {
                    new CubeSide( res, cubePoints[ 0 ], cubePoints[ 1 ], cubePoints[ 3 ], defaultLodLevel, true ),	//	-z
                    new CubeSide( res, cubePoints[ 7 ], cubePoints[ 6 ], cubePoints[ 4 ], defaultLodLevel, true ),	//	+z
                    new CubeSide( res, cubePoints[ 4 ], cubePoints[ 5 ], cubePoints[ 0 ], defaultLodLevel, true ),	//	+y
                    new CubeSide( res, cubePoints[ 6 ], cubePoints[ 7 ], cubePoints[ 2 ], defaultLodLevel, true ),	//	-y
                    new CubeSide( res, cubePoints[ 0 ], cubePoints[ 3 ], cubePoints[ 4 ], defaultLodLevel, true ),	//	-x
                    new CubeSide( res, cubePoints[ 5 ], cubePoints[ 6 ], cubePoints[ 1 ], defaultLodLevel, true )		//	+x
                };

            foreach ( CubeSide side in sides )
            {
                side.PreBuild( m_Builder );
                foreach ( TerrainPatch patch in side.TerrainPatches )
                {
                    m_Patches.Add( patch );
                }
            }

            //	Arrange patches in a spiral, with the centre patch on side -y at position 0
            //int ringSize = 1;
            //CubeSide bottomSide = sides[ 3 ];
            //for ( int offsetFromCentre = 0; offsetFromCentre < res; ++offsetFromCentre )
            //{
            //    if ( offsetFromCentre == 0 )
            //    {
            //        continue;
            //    }
            //    int start = ( res / 2 ) - offsetFromCentre;

            //    ringSize += 2;
            //}

            //int[] cubeSides = new int[]
            //    {
            //        0, 1, 3,	//	-z
            //        7, 6, 4,	//	+z
            //        4, 5, 0,	//	+y
            //        6, 7, 2,	//	-y
            //        0, 3, 4,	//	-x
            //        5, 6, 1		//	+x
            //    };
            //int[] sideConnections = new int[]
            //    {
            //    //	Left	Top		Right	Bottom
            //        4,		2,		5,		3,		//	Side 0 (-z)
            //    //	0,		0,		0,		0,		//	Side 1 (+z)
            //    //	0,		0,		0,		0,		//	Side 2 (+y)
            //    //	0,		0,		0,		0,		//	Side 3 (-y)
            //    //	0,		0,		0,		0,		//	Side 4 (-x)
            //    //	0,		0,		0,		0,		//	Side 5 (+x)
            //    };

            //	for ( int side = 0; side < cubeSides.Length / 3; ++side )
            //for ( int side = 0; side < 1; ++side )
            //{
            //    CubeSide leftSide	= sides[ sideConnections[ side * 4 ] ];
            //    CubeSide topSide	= sides[ sideConnections[ side * 4 + 1 ] ];
            //    CubeSide rightSide	= sides[ sideConnections[ side * 4 + 2 ] ];
            //    CubeSide bottomSide	= sides[ sideConnections[ side * 4 + 3 ] ];

            //    sides[ side ].Link( leftSide, topSide, rightSide, bottomSide );
            //}

            foreach ( CubeSide side in sides )
            {
                side.Build( m_Builder );
            }

            m_PatchRenderState = Graphics.Factory.CreateRenderState( );
            m_PatchRenderState.DepthTest = true;
            m_PatchRenderState.DepthWrite = true;
            m_PatchRenderState.CullBackFaces = true;
            m_PatchRenderState.FaceRenderMode = PolygonRenderMode.Lines;
        }
 /// <summary>
 /// Adds a technique to the global technique stack
 /// </summary>
 public void PushGlobalTechnique( ITechnique technique )
 {
     m_GlobalTechniques.Add( technique );
 }
 /// <summary>
 /// Returns true if this technique is a reasonable substitute for the specified technique
 /// </summary>
 /// <param name="technique">Technique to substitute</param>
 /// <returns>true if this technique can substitute the specified technique</returns>
 public bool IsSubstituteFor( ITechnique technique )
 {
     return ( Technique != null ) && ( Technique.Name == technique.Name );
 }
 /// <summary>
 /// Selects a named technique from the current effect
 /// </summary>
 /// <param name="name">Technique name</param>
 /// <exception cref="ArgumentException">Thrown if name does not correspond to a technique in the current effect</exception>
 public void Select( string name )
 {
     Technique = Effect.Techniques[ name ];
 }
        public OpenGlSpherePlanetRenderer( SpherePlanet planet )
            : base(planet)
        {
            IEffect effect = ( IEffect )AssetManager.Instance.Load( "Effects/Planets/terrestrialPlanet.cgfx" );
            TechniqueSelector selector = new TechniqueSelector( effect, "DefaultTechnique" );

            int res = 128;
            //	IPlanetTerrainGenerator terrainGenerator = new TestStPlanetTerrainGenerator( );
            //	IPlanetTerrainGenerator terrainGenerator = new TestFacePlanetTerrainGenerator( );
            //	IPlanetTerrainGenerator terrainGenerator = new TestCloudGenerator( );
            IPlanetTerrainGenerator terrainGenerator = new TestNoisePlanetTerrainGenerator( );
            ICubeMapTexture planetTexture = Graphics.Factory.CreateCubeMapTexture( );
            planetTexture.Build
                (
                    GeneratePlanetTextureFace( terrainGenerator, PlanetMapFace.PosX, res ),
                    GeneratePlanetTextureFace( terrainGenerator, PlanetMapFace.NegX, res ),
                    GeneratePlanetTextureFace( terrainGenerator, PlanetMapFace.PosY, res ),
                    GeneratePlanetTextureFace( terrainGenerator, PlanetMapFace.NegY, res ),
                    GeneratePlanetTextureFace( terrainGenerator, PlanetMapFace.PosZ, res ),
                    GeneratePlanetTextureFace( terrainGenerator, PlanetMapFace.NegZ, res ),
                    true
                );

            int cloudRes = 128;
            ICubeMapTexture cloudTexture = Graphics.Factory.CreateCubeMapTexture( );
            IPlanetTerrainGenerator cloudGenerator = new TestCloudGenerator( );
            cloudTexture.Build
            (
                GeneratePlanetCloudTextureFace( cloudGenerator, PlanetMapFace.PosX, cloudRes ),
                GeneratePlanetCloudTextureFace( cloudGenerator, PlanetMapFace.NegX, cloudRes ),
                GeneratePlanetCloudTextureFace( cloudGenerator, PlanetMapFace.PosY, cloudRes ),
                GeneratePlanetCloudTextureFace( cloudGenerator, PlanetMapFace.NegY, cloudRes ),
                GeneratePlanetCloudTextureFace( cloudGenerator, PlanetMapFace.PosZ, cloudRes ),
                GeneratePlanetCloudTextureFace( cloudGenerator, PlanetMapFace.NegZ, cloudRes ),
                true
            );

            int bmpIndex = 0;
            foreach ( Bitmap bitmap in planetTexture.ToBitmaps( ) )
            {
                bitmap.Save( planet.Name + " Planet Texture " + bmpIndex++ + ".jpg", ImageFormat.Jpeg );
            }
            m_PlanetTexture = planetTexture;
            m_CloudTexture = cloudTexture;

            m_PlanetTechnique = selector;

            IEffect cloudEffect = ( IEffect )AssetManager.Instance.Load( "Effects/Planets/cloudLayer.cgfx" );
            m_CloudTechnique = new TechniqueSelector( cloudEffect, "DefaultTechnique" );

            Graphics.Draw.StartCache( );
            RenderSphere( 8 );
            m_PlanetGeometry = Graphics.Draw.StopCache( );
        }
Ejemplo n.º 30
0
 public LongRange(ISystem consoleSystem, ITechnique technique = null)
 {
     Technique  = technique ?? new RangeTechnique(consoleSystem);
     RocketType = RocketType.LongRange;
     TryLaunch  = false;
 }
 /// <summary>
 /// Selects a named technique from the specified effect
 /// </summary>
 /// <param name="effect">Effect to select from</param>
 /// <param name="name">Technique name</param>
 /// <exception cref="ArgumentException">Thrown if name does not correspond to a technique in the current effect</exception>
 public void Select( IEffect effect, string name )
 {
     Effect = effect;
     Technique = Effect.Techniques[ name ];
 }
 /// <summary>
 /// Adds a technique to the global technique stack
 /// </summary>
 /// <seealso cref="GlobalTechnique"/>
 public void PushGlobalTechnique( ITechnique technique )
 {
     Arguments.CheckNotNull( technique, "technique" );
     m_InnerContext.PushGlobalTechnique( technique );
 }
Ejemplo n.º 33
0
 public Missile(ITechnique launchTechnique)
 {
     IsFailed        = false;
     LaunchTechnique = launchTechnique;
 }
 /// <summary>
 /// Setup constructor
 /// </summary>
 /// <param name="indices">Index buffer</param>
 /// <param name="technique">Rendering technique</param>
 /// <param name="textures">Textures</param>
 public CellGeometryGroup( int[] indices, ITechnique technique, ITexture2d[] textures )
 {
     m_Indices = indices;
     m_Textures = textures;
     m_Technique = technique;
 }
Ejemplo n.º 35
0
 public Torpedo(ITechnique technique = null)
 {
     Technique  = technique ?? new ProbabilityOneHundredTechnique();
     RocketType = RocketType.Torpedo;
     TryLaunch  = false;
 }
Ejemplo n.º 36
0
 /// <summary>
 /// Finds a technique in this effect that can substitute the specified technique
 /// </summary>
 /// <param name="technique">Technique to substitute</param>
 /// <returns>
 /// Returns an ITechnique from this effect that can substitute technique. If none
 /// can be found, technique is returned.
 /// </returns>
 public ITechnique SubstituteTechnique( ITechnique technique )
 {
     foreach ( ITechnique substituteTechnique in m_Techniques.Values )
     {
         if ( substituteTechnique.IsSubstituteFor( technique ) )
         {
             return substituteTechnique;
         }
     }
     return technique;
 }
 /// <summary>
 /// Assigns this to a planet
 /// </summary>
 protected override void AssignToPlanet( IPlanetRenderer renderer, bool remove )
 {
     renderer.TerrainRenderer = remove ? null : this;
     m_Technique = remove || ( renderer.Planet == null ) ? null : CreatePatchTechnique( renderer.Planet );
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Helper method for adding a technique to the technique dictionary
 /// </summary>
 public void Add( ITechnique technique )
 {
     Techniques.Add( technique.Name, technique );
     technique.Effect = this;
 }
Ejemplo n.º 39
0
 public Balistic(string missileType, ITechnique launchTechnique) : base(launchTechnique)
 {
     MissileType = "Balistic";
 }
 /// <summary>
 /// Setup constructor
 /// </summary>
 /// <param name="technique">Group technique</param>
 /// <param name="textures">Group textures</param>
 public GroupMaterial( ITechnique technique, ITexture2d[] textures )
 {
     m_Technique = technique;
     m_Textures = textures;
 }
Ejemplo n.º 41
0
        // поставить машину на парковку

        public int PutPlaneInParking(ITechnique plane)
        {
            return(parkingStages[currentLevel] + plane);
        }
Ejemplo n.º 42
0
 public Torpedo(string missileType, ITechnique launchTechnique) : base(launchTechnique)
 {
     MissileType = "Torpedo";
 }
 /// <summary>
 /// Renders a renderable object using a given technique
 /// </summary>
 /// <param name="technique">Technique to render with</param>
 /// <param name="renderable">Object to render</param>
 /// <remarks>
 /// Equivalent to <see cref="ITechnique.Apply(IRenderContext,IRenderable)"/>. Differs in that if technique is a valid substitute to the 
 /// global technique (<see cref="GlobalTechnique"/>), technique is used to render the object, otherwise, the
 ///  global technique is used.
 /// </remarks>
 public void ApplyTechnique( ITechnique technique, IRenderable renderable )
 {
     m_InnerContext.ApplyTechnique( technique, renderable );
 }
Ejemplo n.º 44
0
 //Decorator function takes an altered component
 public AttackDecorator(ITechnique attack)
 {
     _attack = attack; //New component then overwrites the original
 }
Ejemplo n.º 45
0
 public AttackDecorator(ITechnique attack) //Decorator function takes an altered component
 {
     _attack = attack;                     //New component then overwrites the original
 }
Ejemplo n.º 46
0
 public Fire(ITechnique attack, int extraDamage, string modifierText)
     : base(attack)
 {
     ExtraDamage = extraDamage;
     ModifierText = modifierText;
 }
Ejemplo n.º 47
0
 public int PutPlaneInParking(ITechnique plane)
 {
     return(parking + plane);
 }
 /// <summary>
 /// Sets the selected technique
 /// </summary>
 public TechniqueSelector( ITechnique technique )
 {
     Technique = technique;
 }