Пример #1
0
 /// <summary>
 /// Creates IMovableGameObject 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 IMovableGameObject.</returns>
 public IMovableGameObject CreateImgo(string typeName, object[] args, SolarSystem solSyst)
 {
     IMovableGameObject imgo = xmlLoader.CreateIMGO(typeName, args);
     solSyst.AddIMGO(imgo);
     Game.HitTest.RegisterIMGO(imgo);
     return imgo;
 }
Пример #2
0
        /// <summary>
        /// Creates IMovableGameObject 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 IMovableGameObject.</returns>
        public IMovableGameObject CreateImgo(string typeName, object[] args, SolarSystem solSyst)               // prepared...never used
        {
            IMovableGameObject imgo = xmlLoader.CreateIMGO(typeName, args);

            solSyst.AddIMGO(imgo);
            Game.HitTest.RegisterIMGO(imgo);
            return(imgo);
        }
Пример #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;
        }