public CBombard(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, int start, int pduration, float pspeed, float pdAngle, CActObj pFromObj, Vector3 pTo, int pisound, bool loop) : base(pThucHanh) { try { this.Name = pName; this.fromObj = pFromObj; this.SpriteObj = this.myThucHanh.Add1SpriteObj(texfile, pWidth, pHeight, 0, this.fromObj.Position, 0f); this.topos = pTo; if (this.topos.Z == 0f) { this.topos.Z = this.myThucHanh.myTerrain.getZ(this.topos.X, this.topos.Y); } this.StartTickCount = start; this.duration = pduration; this.speed = pspeed; this.interval = (int)(this.speed * 1000f); this.dAngle = pdAngle; this.rAngle = Geometry.DegreeToRadian(this.dAngle); this.StopTickCount = this.StartTickCount + this.duration; this.isound = pisound; this.soundloop = loop; } catch (Exception ex) { throw ex; } }
public CMove(CThucHanh pThucHanh, string pName, CActObj pObj, int start, int pduration, List <Vector3> ptargets, bool pstophide, float pdstopangleZ, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.Obj = pObj; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; this.stophide = pstophide; this.stopangleZ = Geometry.DegreeToRadian(pdstopangleZ); this.targets = new List <CTarget>(); foreach (Vector3 current in ptargets) { CTarget cTarget = new CTarget(); cTarget.Position = current; if (cTarget.Position.Z == 0f) { cTarget.Position.Z = this.myThucHanh.myTerrain.getZ(current.X, current.Y); } this.targets.Add(cTarget); } this.targetsCount = this.targets.Count; this.SetTickCount(); this.itarget = 0; this.done = false; this.isound = pisound; this.soundloop = loop; }
public CAppear(CThucHanh pThucHanh, string pName, CTexObj pObj, int start, int pduration, int psteps, float pPartial, bool pstophide, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.Obj = pObj; this.RenderSurface = this.Obj.GetRenderSurface(); this.StartTickCount = start; this.duration = pduration; this.stophide = pstophide; this.steps = psteps; if (this.steps < 1) { this.steps = 1; } this.partial = pPartial; if (this.partial < 0.1f) { this.partial = 0.1f; } if (this.partial > 1f) { this.partial = 1f; } this.StopTickCount = this.StartTickCount + this.duration; this.interval = this.duration / this.steps; this.ImageWidth = this.Obj.ImageWidth - 2 * this.Obj.PixelsPerGridX; this.ImageHeight = this.Obj.ImageHeight - 2 * this.Obj.PixelsPerGridY; this.done = false; this.isound = pisound; this.soundloop = loop; this.iLastStep = 0; }
public void UpdateDirection(CThucHanh pThucHanh, float pAngleZ) { float num = pAngleZ + 1.57079637f; num += pThucHanh.getAngleZ(); CAct.NormAngle(ref num); this.UpdateDirection(num); }
public CCornerTitle(CThucHanh pThucHanh, string pName, int start, int pduration, string pCornerText) : base(pThucHanh) { this.Name = pName; this.CornerText = pCornerText; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; }
private void UpdateDirection(CThucHanh pThucHanh) { float num = this.angleZ + 1.57079637f; num += pThucHanh.getAngleZ(); CAct.NormAngle(ref num); this.UpdateDirection(num); }
public CHide(CThucHanh pThucHanh, string pName, CActObj pObj, int start, int pduration, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.Obj = pObj; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; this.isound = pisound; this.soundloop = loop; }
public CSpinToBB(CThucHanh pThucHanh, string pName, CBillboard pObj, int start, int pduration, Vector3 ptopos, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.Obj = pObj; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; this.topos = ptopos; this.isound = pisound; this.soundloop = loop; }
public CDescription(CThucHanh pThucHanh, string pName, int start, int pduration, string pDescText, DescPos pPos, bool pSaBanHide, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.DescText = pDescText; this.Pos = pPos; this.SaBanHide = pSaBanHide; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; this.isound = pisound; this.soundloop = loop; }
public CFocusAt(CThucHanh pThucHanh, string pName, int start, int pduration, float pCenterX, float pCenterY, Vector3 pcameraPos, float pangleZ, float pangleX) : base(pThucHanh) { this.Name = pName; this.cameraPos = pcameraPos; this.angleZ = pangleZ; this.angleX = pangleX; this.CenterX = pCenterX; this.CenterY = pCenterY; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; }
public CSpin(CThucHanh pThucHanh, string pName, CModel pObj, int start, int pduration, float pAngleZ, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.Obj = pObj; this.StartTickCount = start; this.duration = pduration; this.StopTickCount = this.StartTickCount + this.duration; this.dAngleZ = pAngleZ; this.rAngleZ = Geometry.DegreeToRadian(this.dAngleZ); this.saveAngleZ = this.Obj.angleZ; this.isound = pisound; this.soundloop = loop; }
public void Render(CThucHanh pThucHanh, Matrix pTerrainMatrix, float pAngleZ) { this.UpdateDirection(pThucHanh); this.m_frame++; if (this.m_frame > this.m_frameMax) { this.m_frame = 0; } int texIndex = this.GetTexIndex(this.m_frame); float angle = -pAngleZ; this.myTerrain.device.Transform.World = Matrix.RotationZ(angle) * Matrix.Translation(this.Position.X, this.Position.Y, this.Position.Z - this.m_BillboardMesh.ShiftZ) * pTerrainMatrix; this.m_BillboardMesh.Render(texIndex); }
public CBlink(CThucHanh pThucHanh, string pName, CActObj pObj, int start, int pduration, float pspeed, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.Obj = pObj; this.StartTickCount = start; this.duration = pduration; this.speed = pspeed; if (this.speed < 1f) { this.speed = 1f; } this.StopTickCount = this.StartTickCount + this.duration; this.interval = (int)(1000f / this.speed); this.isound = pisound; this.soundloop = loop; }
public CSpriteObj(CThucHanh pThucHanh, float pwidth, float pheight, int pVertical, string pTexFile, Vector3 position, float pshiftZ) { this.myThucHanh = pThucHanh; this.m_position = position; if (position.Z == 0f) { this.m_position.Z = this.myThucHanh.myTerrain.getZ(this.m_position.X, this.m_position.Y); } this.m_AngleX = 0f; this.m_AngleZ = 0f; this.m_AngleY = 0f; this.m_shiftZ = pshiftZ; this.m_TextureFile = pTexFile; this.m_width = pwidth; this.m_height = pheight; this.VertexDeclaration(pVertical); this.LoadTexturesAndMaterials(pTexFile); }
public CShootFrom(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, int start, int pduration, float pspeed, CActObj pFromObj, Vector3 pTo, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.fromObj = pFromObj; this.SpriteObj = this.myThucHanh.Add1SpriteObj(texfile, pWidth, pHeight, 0, this.fromObj.Position, 0f); this.topos = pTo; if (pTo.Z == 0f) { this.topos.Z = this.myThucHanh.myTerrain.getZ(this.topos.X, this.topos.Y) - 0.2f; } this.StartTickCount = start; this.duration = pduration; this.speed = pspeed; this.tickcount = (int)(this.speed * 1000f); this.StopTickCount = this.StartTickCount + this.duration; this.from2 = new CTarget(); this.to2 = new CTarget(); this.isound = pisound; this.soundloop = loop; }
public CShoot(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, int start, int pduration, float pspeed, Vector3 pFromPos, Vector3 pTo, int pisound, bool loop) : base(pThucHanh) { this.Name = pName; this.frompos = pFromPos; this.SpriteObj = this.myThucHanh.Add1SpriteObj(texfile, pWidth, pHeight, 0, this.frompos, 0f); this.origtopos = pTo; if (this.origtopos.Z == 0f & this.frompos.Z == 0f) { this.NeedShiftZ = true; } if (this.origtopos.Z == 0f) { this.origtopos.Z = this.myThucHanh.myTerrain.getZ(this.origtopos.X, this.origtopos.Y); } this.StartTickCount = start; this.duration = pduration; this.speed = pspeed; this.StopTickCount = this.StartTickCount + this.duration; this.from2 = new CTarget(); this.to2 = new CTarget(); this.Calc2(); this.isound = pisound; this.soundloop = loop; }
public override void UpdateAct(int pTickCount) { if (this.started) { int num = pTickCount - this.LastTickCount; this.LastTickCount += num; this.myThucHanh.angleZ += this.rAngleZ * (float)num / (float)this.duration; this.myThucHanh.angleX += this.rAngleX * (float)num / (float)this.duration; this.myThucHanh.CenterX += this.rCenterX * (float)num / (float)this.duration; this.myThucHanh.CenterY += this.rCenterY * (float)num / (float)this.duration; CThucHanh expr_B9_cp_0 = this.myThucHanh; expr_B9_cp_0.cameraPos.Y = expr_B9_cp_0.cameraPos.Y + this.rcameraPosY * (float)num / (float)this.duration; this.myThucHanh.cameraPos.Z = this.myThucHanh.cameraPos.Y / 2f; return; } if (this.duration > 0) { this.Calc2(); this.LastTickCount = this.StartTickCount; this.started = true; return; } this.myThucHanh.ChangeFocus(this.CenterX, this.CenterY, this.cameraPos, this.angleZ, this.angleX); }
public CBombardO2P(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, int start, int pduration, float pspeed, float pdAngle, CActObj pFromObj, Vector3 pTo, int pisound, bool loop) : base(pThucHanh, pName, texfile, pWidth, pHeight, start, pduration, pspeed, pdAngle, pFromObj, pTo, pisound, loop) { }
public CShootO2P(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, int start, int pduration, float pspeed, CActObj pFromObj, Vector3 pTo, int pisound, bool loop) : base(pThucHanh, pName, texfile, pWidth, pHeight, start, pduration, pspeed, pFromObj, pTo, pisound, loop) { this.interval = (int)(this.speed * 1000f); }
public CAppearDown(CThucHanh pThucHanh, string pName, CTexObj pObj, int start, int pduration, int psteps, float pPartial, bool pstophide, int pisound, bool loop) : base(pThucHanh, pName, pObj, start, pduration, psteps, pPartial, pstophide, pisound, loop) { }
public CFly(CThucHanh pThucHanh, string pName, CActObj pObj, int start, int pduration, List <Vector3> ptargets, bool pstophide, int pisound, bool loop) : base(pThucHanh, pName, pObj, start, pduration, ptargets, pstophide, pisound, loop) { }
public CExplodeObj(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, float pShiftZ, int start, int pduration, float pspeed, Vector3 pexplPos, int pisound, bool loop) : base(pThucHanh) { this.explPos = pexplPos; this.CreatExplode(pName, texfile, pWidth, pHeight, pShiftZ, start, pduration, pspeed, pisound, loop); }
public CMnu(CThucHanh pThucHanh) { this.myThucHanh = pThucHanh; this.mnuItems = new List <CMnuItem>(); this.scripts = new List <CScript>(); }
public CExplodeMObj(CThucHanh pThucHanh, string pName, string texfile, float pWidth, float pHeight, float pShiftZ, int start, int pduration, float pspeed, CActObj pexplObj, int pisound, bool loop) : base(pThucHanh, pName, texfile, pWidth, pHeight, pShiftZ, start, pduration, pspeed, pexplObj, pisound, loop) { }
public CDisappearLeft(CThucHanh pThucHanh, string pName, CTexObj pObj, int start, int pduration, int psteps, float pPartial, int pisound, bool loop) : base(pThucHanh, pName, pObj, start, pduration, psteps, pPartial, pisound, loop) { }
public CAct(CThucHanh pThucHanh) { this.myThucHanh = pThucHanh; }