public void Run(string name, DEVICE_PACK ip,string pname) { DEVICE_PACK p = (DEVICE_PACK)L.Globals[pname].CLRObject; p.Init(ip); p.gameList = ip.gameList; p.camera = ip.camera; LoadScript(name); }
public MENU(DEVICE_PACK ip, Game game) : base(game) { p = new DEVICE_PACK(ip); p.gameList = new GAMELIST(); p.camera = new CAMERA(); p.camera.Init(p); }
public PLATFORMER(DEVICE_PACK ip, Game game, string iscriptname) : base(game) { p = new DEVICE_PACK(ip); p.ps = new PhysicsSimulator(new Vector2(0, -10)); p.gameList = new GAMELIST(); p.camera = new CAMERA(); p.camera.Init(p); scriptname = iscriptname; }
public void Init(DEVICE_PACK ip) { p = ip; obj.Init(p, "skeleton", "ui", new Vector2(0.5f, 2), OBJTYPE.all); obj.makeBox(0.5f, 2, 60); obj.setFriction(2); obj.mesh.AnimCount = new Vector2(4, 4); obj.mesh.PlayLoop(0.01f, 0, 0); obj.mesh.PlayLoop(1, 0, 1); p.gameList.monsterList.Add(this); }
public void addEllipse(DEVICE_PACK p, string iname, string texture, Vector2 wh, Vector2 radXY, float mass, float friction, bool isStatic) { OBJECT obj = new OBJECT(); obj.Init(p, texture, "ui", wh, OBJTYPE.all); obj.makeEllipse(radXY.X, radXY.Y, mass); obj.Position = new Vector2(0, -1000); obj.setFriction(friction); obj.setStatic(isStatic); obj.name = iname; objList.Add(obj); click = true; focusObj = obj; if (focusPos != new Vector2(0, -1000)) obj.Position = focusPos; ellipseCount++; }
public INTRO(DEVICE_PACK ip, Game game) : base(game) { p = new DEVICE_PACK(); p.Content = ip.Content; p.ps = ip.ps; p.gd = ip.gd; p.gdm = ip.gdm; p.input = ip.input; p.state = ip.state; p.scale = ip.scale; p.time = ip.time; p.objList = new OBJECTLIST(); p.camera = new CAMERA(); p.camera.Init(p); }
public OBJ_DESC(DEVICE_PACK ip) { p = ip; geomType = GEOMTYPE.none; globalGeomType = GEOMTYPE.none; }
public void Init(DEVICE_PACK dp) { p = dp; view = Matrix.CreateLookAt(eye, targ, up); proj = Matrix.CreatePerspectiveFieldOfView(3.14f / 4, p.gd.Viewport.Width / p.gd.Viewport.Height, 1, 1000); teye = eye; ttarg = targ; tup = up; }
public void Init(string name, DEVICE_PACK ip) { LoadScript(name); DEVICE_PACK p = (DEVICE_PACK)L.Globals["p"].CLRObject; p.Init(ip); }
public bool Init(DEVICE_PACK dp) { obj.debugVerts = true; p = dp; if (obj.Init(dp, "player_1", "player", new Vector2(0.5f, 2), OBJTYPE.none)) return true; obj.makeBox(0.5f, 2, 65); obj.setFriction(1); obj.objDesc[0].geom.OnCollision += OnCollision; return false; }
public void Init(DEVICE_PACK p, string texname, Vector2 wh) { state = 0; mesh.Init(p, texname, "level", wh, OBJTYPE.none); }
public bool Init(DEVICE_PACK dp, string itexname, string imodelname, Vector2 iwh, OBJTYPE itype) { p = dp; type = itype; mesh.Init(p, itexname, imodelname, iwh, OBJTYPE.none); if (debugVerts) baseEffect = new BasicEffect(p.gd, null); mesh.rot = Matrix.CreateRotationZ(0); if (type != OBJTYPE.none) p.gameList.objList.Add(this); return false; }
public bool Init(DEVICE_PACK dp, string itexname, string imodelname, Vector2 iwh, string type) { return Init(dp, itexname, imodelname, iwh, DEVICE_PACK.typeByName(type)); }
public void Init(DEVICE_PACK ip) { Content = ip.Content; ps = ip.ps; gd = ip.gd; gdm = ip.gdm; input = ip.input; state = ip.state; scale = ip.scale; time = ip.time; lua = ip.lua; time = ip.time; }
public DEVICE_PACK(DEVICE_PACK ip) { Init(ip); }
public void Init(DEVICE_PACK p) { foreach(OBJECT obj in p.gameList.objList) { if (obj.name == "none") continue; objList.Add(obj); if (obj.geomType == GEOMTYPE.box) boxCount++; if (obj.geomType == GEOMTYPE.circle) circleCount++; if (obj.geomType == GEOMTYPE.ellipse) ellipseCount++; } }
public bool Init(DEVICE_PACK dp, string itexname, string imodelname, Vector2 iwh, OBJTYPE itype) { p = dp; wh = iwh; k = new Vector4(wh.X, wh.Y, 0, 0); uv = new Vector4(1, 1, 0, 0); texname = itexname; modelname = imodelname; type = itype; tex = null; model = null; tex = dp.Content.Load<Texture2D>("textures/" + texname); model = dp.Content.Load<Model>("models/" + modelname); if (tex == null || model == null) return true; rot = Matrix.Identity; if (type != OBJTYPE.none) p.gameList.meshList.Add(this); return false; }