Пример #1
0
 /// <summary>
 /// Creates IStaticGameObject by the given typeName and arguments. 
 /// Inserts the object to given SolarSystem and registers it in HitTest.
 /// </summary>
 /// <param name="typeName">The type of the creating object.</param>
 /// <param name="args">The arguments of the creating object.</param>
 /// <param name="solSyst">The creating object SolarSystem.</param>
 /// <returns>Returns created IStaticGameObject.</returns>
 public IStaticGameObject CreateIsgo(string typeName, object[] args, SolarSystem solSyst)
 {
     IStaticGameObject isgo = xmlLoader.CreateISGO(typeName, args);
     solSyst.AddISGO(isgo);
     Game.HitTest.RegisterISGO(isgo);
     return isgo;
 }
Пример #2
0
        /// <summary>
        /// Creates IStaticGameObject by given typeName and argument. Inserts the object to given SolarSystem and registers it in HitTest.
        /// </summary>
        /// <param name="typeName">The type of the creating object.</param>
        /// <param name="args">The arguments of the creating object.</param>
        /// <param name="solSyst">The creating object SolarSystem.</param>
        /// <returns>Returns created IStaticGameObject.</returns>
        public IStaticGameObject CreateIsgo(string typeName, object[] args, SolarSystem solSyst)                // prepared...never used
        {
            IStaticGameObject isgo = xmlLoader.CreateISGO(typeName, args);

            solSyst.AddISGO(isgo);
            Game.HitTest.RegisterISGO(isgo);
            return(isgo);
        }
Пример #3
0
        /// <summary>
        /// Creates a new SolarSystem with given unique name, position, and members.
        /// </summary>
        /// <param name="name">The unique name.</param>
        /// <param name="position">The position of the SolarSystem.</param>
        /// <param name="isgoObjects">The static members.</param>
        /// <param name="imgoObjects">The movable members.</param>
        /// <param name="sun">The sun of the SolarSystem (could be null).</param>
        /// <returns>Returns created SolarSystem.</returns>
        private SolarSystem CreateSolarSystem(string name, Vector3 position, List <IStaticGameObject> isgoObjects, List <IMovableGameObject> imgoObjects,
                                              IStaticGameObject sun = null)
        {
            SolarSystem sSys = new SolarSystem(name, position);

            sSys.AddISGO(isgoObjects);
            sSys.AddIMGO(imgoObjects);
            sSys.Sun = sun;
            return(sSys);
        }
Пример #4
0
        /// <summary>
        /// Creates a new SolarSystem with given unique name, position, and members.
        /// </summary>
        /// <param name="name">The unique name.</param>
        /// <param name="position">The position of the SolarSystem.</param>
        /// <param name="isgoObjects">The static members.</param>
        /// <param name="imgoObjects">The movable members.</param>
        /// <param name="sun">The sun of the SolarSystem (could be null).</param>
        /// <returns>Returns created SolarSystem.</returns>
        private SolarSystem CreateSolarSystem(string name, Vector3 position, List<IStaticGameObject> isgoObjects, List<IMovableGameObject> imgoObjects,
			IStaticGameObject sun = null)
        {
            SolarSystem sSys = new SolarSystem(name, position);
            sSys.AddISGO(isgoObjects);
            sSys.AddIMGO(imgoObjects);
            sSys.Sun = sun;
            return sSys;
        }