public void AddObject(InteractiveObject iObject)
 {
     interactiveObjects.Add(iObject);
 }
Exemple #2
0
        public void IObjectDataChanged(string iObject, float[] iObjectParameters)
        {
            CultureInfo info = CultureInfo.CreateSpecificCulture("en-us");
            iObjectName = iObject;
            this.iObjectParameters = iObjectParameters;
            switch (iObject)
            {
                case "JumpPad":
                    Vector2 force = new Vector2(iObjectParameters[1],0).Rotate(iObjectParameters[0],true);
                    if (this.iObject != null)
                        this.iObject.Dispose();
                    this.iObject = new JumpPad();
                    this.iObject.Initialize(Services, options, GraphicsDevice,
                        "0,0,32,32," +
                        force.X.ToString(info) + "," +
                        force.Y.ToString(info) + "," +
                        iObjectParameters[2].ToString(info));
                break;

            }
        }