/// <summary> /// 构造一个宇宙舰基对象,会碰撞的 /// </summary> public BWarship(Node node,Vector2 pos,float width,float height, ContactType ctype,ContactDeal td,ContactDeal bd,string path) : base(node,0,0,pos,width,height,ctype,td,bd) { body = new SpriteX(this,path,pos); body.CenterSprite(TRS.Local.Center); HP = 100; Speed=8f; MaxRotSpeed = 0.02f; RotSpeed =MaxRotSpeed; RotSpeedInc = 0.002f; this.Body.Scale = allWarshipScale; }
/// <summary> /// 构造一个宇宙舰基对象,会碰撞的 /// </summary> public BWarship(Node node, Vector2 pos, float width, float height, ContactType ctype, ContactDeal td, ContactDeal bd, string path) : base(node, 0, 0, pos, width, height, ctype, td, bd) { body = new SpriteX(this, path, pos); body.CenterSprite(TRS.Local.Center); HP = 100; Speed = 8f; MaxRotSpeed = 0.02f; RotSpeed = MaxRotSpeed; RotSpeedInc = 0.002f; this.Body.Scale = allWarshipScale; }
/// <summary> /// 创建一个活体,带有碰撞检测 /// </summary> public LiveObject(Node node,float CreatTime,float DieTime, Vector2 center, float width,float height,ContactType ctype, ContactDeal td,ContactDeal bd) : base(node) { //drawBoundBox = new DrawBoundBox(this); this.toContactDeal = td; this.beContactDeal = bd; this.Width = width; this.Heigth = height; this.Center = new Vector2(center.X,-center.Y); this.CType = ctype; Sce.Pss.HighLevel.GameEngine2D.Scheduler.Instance.Schedule(this, Tick, 0.0f, false); this.GodTimer = CreatTime; this.DieTime = DieTime; this.Born(); //this.ContactDate = new List<Contacter.Contact>();//碰撞资料 this.status = ObjectStatus.God; }
/// <summary> /// 创建一个活体,带有碰撞检测 /// </summary> public LiveObject(Node node, float CreatTime, float DieTime, Vector2 center, float width, float height, ContactType ctype, ContactDeal td, ContactDeal bd) : base(node) { //drawBoundBox = new DrawBoundBox(this); this.toContactDeal = td; this.beContactDeal = bd; this.Width = width; this.Heigth = height; this.Center = new Vector2(center.X, -center.Y); this.CType = ctype; Sce.Pss.HighLevel.GameEngine2D.Scheduler.Instance.Schedule(this, Tick, 0.0f, false); this.GodTimer = CreatTime; this.DieTime = DieTime; this.Born(); //this.ContactDate = new List<Contacter.Contact>();//碰撞资料 this.status = ObjectStatus.God; }