• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AcademyPopcorn.GameObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AcademyPopcorn.GameObject的典型用法代码示例。如果您正苦于以下问题:C# GameObject类的具体用法?C# GameObject怎么用?C# GameObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GameObject类属于AcademyPopcorn命名空间,在下文中一共展示了GameObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddRacket

 private void AddRacket(GameObject obj)
 {
     // remove the previous racket from this.allObjects and this.staticObjects
     RemoveRacket();
     this.playerRacket = obj as Racket;
     this.AddStaticObject(obj);
 }
开发者ID:nikolaynikolov,项目名称:Telerik,代码行数:7,代码来源:Engine.cs


示例2: AddRacket

 private void AddRacket(GameObject obj)
 {
     //TODO: we should remove the previous racket from this.allObjects
     //the solution is above, in AddObject()
     this.playerRacket = obj as Racket;
     this.AddStaticObject(obj);
 }
开发者ID:Varbanov,项目名称:TelerikAcademy,代码行数:7,代码来源:Engine.cs


示例3: AddRacket

 /* Search for a "TODO" in the Engine class, regarding the AddRacket method. Solve the problem mentioned there.
  * There should always be only one Racket. Note: comment in TODO not completely correct*/
 private void AddRacket(GameObject obj)
 {
     //TODO: we should remove the previous racket from this.allObjects
     RemovePreviousRacket();
     this.playerRacket = obj as Racket;
     this.AddStaticObject(obj);
 }
开发者ID:quela,项目名称:myprojects,代码行数:9,代码来源:Engine.cs


示例4: AddRacket

 private void AddRacket(GameObject obj)
 {
     //all previous Rackets removed
     this.allObjects.RemoveAll(x => x is Racket);
     this.staticObjects.RemoveAll(x => x is Racket);
     this.playerRacket = obj as Racket;
     this.AddStaticObject(obj);
 }
开发者ID:niki-funky,项目名称:Telerik_Academy,代码行数:8,代码来源:Engine.cs


示例5: AddRacket

 private void AddRacket(GameObject obj)
 {
     //TODO: we should remove the previous racket from this.allObjects
     this.playerRacket = obj as Racket;
     this.allObjects.RemoveAll(ob => ob is Racket);
     this.staticObjects.RemoveAll(ob => ob is Racket);
     this.AddStaticObject(obj);
 }
开发者ID:RRRRRRRRRR,项目名称:thegodmode.github.com,代码行数:8,代码来源:Engine.cs


示例6: AddObject

 public override void AddObject(GameObject obj)
 {
     var as_racket = obj as ShootingRacket;
     if (as_racket != null) {
         racket = as_racket;
     }
     base.AddObject(obj);
 }
开发者ID:staafl,项目名称:misc,代码行数:8,代码来源:ShootingEngine.cs


示例7: AddTrailingObject

 public void AddTrailingObject(GameObject obj)
 {
     if (obj is TrailObject)
     {
         allObjects.Add(obj as TrailObject);
         staticObjects.Add(obj as TrailObject);
     }
 }
开发者ID:huoxudong125,项目名称:TelerikAcademy,代码行数:8,代码来源:Engine.cs


示例8: AddObject

 //overriding of this method is important for task 13 in order to get access to the fields of the current racket
 public override void AddObject(GameObject obj)
 {
     if (obj is ShootingRacket)
     {
         ShootingRacket newRacket = obj as ShootingRacket;
         this.playerRacket = newRacket;
     }
     base.AddObject(obj);
 }
开发者ID:kalinalazarova1,项目名称:TelerikAcademy,代码行数:10,代码来源:EngineShootPlayerRacket.cs


示例9: AddRacket

        private void AddRacket(GameObject obj)
        {
            //TODO: we should remove the previous racket from this.allObjects
            // 3. Removing the rackets from allObjects and staticObjects

            this.playerRacket = obj as Racket;
            this.allObjects.RemoveAll(item => item is Racket); // this line should be as comment if we use multiple rackets
            this.staticObjects.RemoveAll(item => item is Racket);
            this.AddStaticObject(obj);
        }
开发者ID:RosenTodorov,项目名称:MyProjects,代码行数:10,代码来源:Engine.cs


示例10: AddRacket

        private void AddRacket(GameObject obj)
        {
            //TODO: we should remove the previous racket from this.allObjects
            //Task 3: Implementing Removing of all elements of Type Racket from allObjects
            var toRemove = this.allObjects.OfType<Racket>().ToList();
            foreach (var item in toRemove)
                this.allObjects.Remove(item);

            this.playerRacket = obj as Racket;
            this.AddStaticObject(obj);
        }
开发者ID:aleks-todorov,项目名称:HomeWorks,代码行数:11,代码来源:Engine.cs


示例11: AddRacket

        private void AddRacket(GameObject obj)
        {
            //TODO: we should remove the previous racket from this.allObjects

            // 03. Removing the old Racket using Lambda
            // We can also search the whole list of objects and remove the object that is Racket
            this.allObjects.RemoveAll(item => item is Racket);
            this.staticObjects.RemoveAll(item => item is Racket);

            this.playerRacket = obj as Racket;
            this.AddStaticObject(obj);
        }
开发者ID:nzhul,项目名称:TelerikAcademy,代码行数:12,代码来源:Engine.cs


示例12: AddRacket

 private void AddRacket(GameObject obj)
 {
     for(int i = 0; i < allObjects.Count; i++) {
       if(allObjects[i] is Racket) {
         allObjects.RemoveAt(i);
         break;
       }
     }
     //TODO: we should remove the previous racket from this.allObjects
     this.playerRacket = obj as Racket;
     this.AddStaticObject(obj);
 }
开发者ID:Jarolim,项目名称:AllMyHomeworkForTelerikAcademy,代码行数:12,代码来源:Engine.cs


示例13: AddObject

 // Add some object in depending his type
 public virtual void AddObject(GameObject obj)
 {
     if (obj is MovingObject)
     {
         this.AddMovingObject(obj as MovingObject);
     }
     else
     {
         if (obj is Racket) AddRacket(obj);
         else this.AddStaticObject(obj);
     }
 }
开发者ID:Termininja,项目名称:TelerikAcademy,代码行数:13,代码来源:Engine.cs


示例14: AddRacket

        private void AddRacket(GameObject obj)
        {
            //TODO: we should remove the previous racket from this.allObjects
           /* 03. Search for a "TODO" in the Engine class, regarding the AddRacket method. 
            * Solve the problem mentioned there. There should always be only one Racket. 
            * Note: comment in TODO not completely correct
            */

            this.playerRacket = obj as Racket;
            this.allObjects.RemoveAll(x => x is Racket); // should be always one racket
            this.AddStaticObject(obj);
        }
开发者ID:Jarolim,项目名称:AllMyHomeworkForTelerikAcademy,代码行数:12,代码来源:Engine.cs


示例15: AddRacket

 // Task 3 - I have decided that, since it was mentioned that the comment in the code was not completely correct and
 // that the only condition is to have one racket, to keep the original racket. The method checks whether we have
 // a Racket object in the list of all objects and then, if not, to add the racket.5
 protected virtual void AddRacket(GameObject obj)
 {
     bool check=true;
     foreach (var c in this.allObjects)
     {
         if (c is Racket)
             check = false;
     }
     if (check)
     {
         this.playerRacket = obj as Racket;
         this.AddStaticObject(obj);
     }
 }
开发者ID:PetarPenev,项目名称:Telerik,代码行数:17,代码来源:Engine.cs


示例16: AddRacket

 private void AddRacket(GameObject obj)
 {
     //3.Search for TODO and remove racket. There should always be only one racket.
     //TODO: we should remove the previous racket from this.allObjects
     this.playerRacket = obj as Racket;
     for (int i = 0; i < allObjects.Count; i++)
     {
         if (allObjects[i] is Racket)
         {
             allObjects.RemoveAt(i);
             break;
         }
     }
     this.AddStaticObject(obj);
     
 }
开发者ID:hristo11111,项目名称:TelerikAcademy-HristoBratanov,代码行数:16,代码来源:Engine.cs


示例17: AddObject

 public virtual void AddObject(GameObject obj)
 {
     if (obj is MovingObject)
     {
         this.AddMovingObject(obj as MovingObject);
     }
     else
     {
         if (obj is Racket)
         {
             // TASK 3
             this.allObjects.RemoveAll(gameObject => gameObject is Racket);
             AddRacket(obj);
         }
         else
         {
             this.AddStaticObject(obj);
         }
     }
 }
开发者ID:klimentt,项目名称:Telerik-Academy,代码行数:20,代码来源:Engine.cs


示例18: AddObject

 public virtual void AddObject(GameObject obj)
 {
     if (obj is MovingObject)
     {
         this.AddMovingObject(obj as MovingObject);
     }
     else
     {
         if (obj is Racket)
         {
             //03.Search for a "TODO" in the Engine class, regarding the AddRacket method. Solve the problem mentioned there. 
             //There should always be only one Racket. Note: comment in TODO not completely correct
             this.allObjects.RemoveAll(allObj => allObj is Racket);
             //END 03
             AddRacket(obj);
         }
         else
         {
             this.AddStaticObject(obj);
         }
     }
 }
开发者ID:Varbanov,项目名称:TelerikAcademy,代码行数:22,代码来源:Engine.cs


示例19: AddRacket

 protected override void AddRacket(GameObject obj)
 {
     bool check = true, secondCheck=true;
     ShootingRacket l;
     foreach (var c in this.allObjects)
     {
         if ((c is Racket) && !(c is ShootingRacket))
             check = false;
         else if (c is ShootingRacket)
             secondCheck = false;
     }
     if (check)
     {
         this.playerRacket = obj as Racket;
         this.AddStaticObject(obj);
     }
     else if (!secondCheck)
     {
         this.playerRacket = obj as ShootingRacket;
         this.AddStaticObject(obj);
     }
 }
开发者ID:PetarPenev,项目名称:Telerik,代码行数:22,代码来源:InheritedEngine.cs


示例20: AddRacket

        private void AddRacket(GameObject obj)
        {
            //03. Search for a "TODO" in the Engine class, regarding the AddRacket method. Solve the problem mentioned
            //    there. There should always be only one Racket. Note: comment in TODO not completely correct
            // TODO: we should remove the previous racket from this.allObjects
            //================================================================================================== Task 03>
            // obj is added to staticObjects AND allObjects (AddStaticObject(obj)), which means it should be removed from both
            this.allObjects.RemoveAll(x => x is Racket);
            this.staticObjects.RemoveAll(x => x is Racket);
            //================================================================================================== >Task 03

            this.playerRacket = obj as Racket;
            this.AddStaticObject(obj);
        }
开发者ID:Velmond,项目名称:TelerikAcademy-CSharp,代码行数:14,代码来源:Engine.cs



注:本文中的AcademyPopcorn.GameObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AcademyPopcorn.MatrixCoords类代码示例发布时间:2022-05-24
下一篇:
C# AcademyPopcorn.CollisionData类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap