Esempio n. 1
0
 /// <summary>
 /// Adds a utility to the renderer
 /// </summary>
 /// <param name="id">Utility reference ID</param>
 /// <param name="_util">The parameters of the utility</param>
 /// <param name="_position">The position to insert the utility</param>
 public void AddUtility(int id, string modelName, Vector3 _position)
 {
     Model mod = ServiceManager.Resources.GetModel("powerups\\" + modelName);
     UtilityIcon newUtility = new UtilityIcon(mod, _position + new Vector3(0,0,30));
     newUtility.RenderID = ServiceManager.Scene.Add(newUtility, 1);
     utilities[id] = newUtility;
 }
Esempio n. 2
0
        /// <summary>
        /// Adds a utility to the renderer
        /// </summary>
        /// <param name="id">Utility reference ID</param>
        /// <param name="_util">The parameters of the utility</param>
        /// <param name="_position">The position to insert the utility</param>
        public void AddUtility(int id, string modelName, Vector3 _position)
        {
            Model       mod        = ServiceManager.Resources.GetModel("powerups\\" + modelName);
            UtilityIcon newUtility = new UtilityIcon(mod, _position + new Vector3(0, 0, 30));

            newUtility.RenderID = ServiceManager.Scene.Add(newUtility, 1);
            utilities[id]       = newUtility;
        }