当前位置: 首页>>代码示例>>C#>>正文


C# ObjectManager类代码示例

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


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

示例1: Init

        public void Init()
        {
            FileInfo logFile = new System.IO.FileInfo("Log4Net.config");
            if (logFile.Exists)
            {
                // Log4Net is configured using a DOMConfigurator.
                log4net.Config.XmlConfigurator.Configure(logFile);
            }
            else
            {
                // Set up a simple configuration that logs on the console.
                log4net.Config.BasicConfigurator.Configure();
            }

            // Log an baseInfo level message
            if (log.IsDebugEnabled)
            {
                if (string.IsNullOrEmpty(System.Threading.Thread.CurrentThread.Name))
                    System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")";
                log.Debug("Interaction Tests Start");
            }

            ObjectManager objectManager = new ObjectManager();
            Sxta.Rti1516.HLAAttributes.HLAobjectRoot.AddIHLAobjectRootCreationListener(objectManager);
        }
开发者ID:superliujian,项目名称:Sxta,代码行数:25,代码来源:AOPTests2.cs

示例2: Bug

 private static bool Bug() {
 ObjectManager objmgr1;
 StreamingContext sc1;
 ObjectIDGenerator objid1;
 TestFixup tstfxp1;
 Int64 iRootID;
 Int64 iChildID;
 String strValue;
 MemberInfo[] members;
 Boolean fFirstTime;
 sc1 = new StreamingContext(StreamingContextStates.All);
 tstfxp1 = new TestFixup();
 strValue = "Hello World";
 objid1 = new ObjectIDGenerator();
 iRootID = objid1.GetId(tstfxp1, out fFirstTime);
 iChildID = objid1.GetId(strValue, out fFirstTime);
 members = FormatterServices.GetSerializableMembers(tstfxp1.GetType()); 
 objmgr1 = new ObjectManager(null, sc1);
 objmgr1.RecordFixup(iRootID, members[0], iChildID);
 try {
 objmgr1.RegisterObject(strValue, iChildID);	
 return true;
 } catch(Exception ex){
 Console.WriteLine("Bug:Exception thrown, " + ex);
 return false;
 }
 }
开发者ID:ArildF,项目名称:masters,代码行数:27,代码来源:coserializationregression.cs

示例3: GetMirroredObject

		/// <summary>Creates a mirrored copy of the prototype object (Animated objects)</summary>
		/// <param name="Prototype">The prototype</param>
		/// <returns>The mirrored copy</returns>
		private static ObjectManager.UnifiedObject GetMirroredObject(ObjectManager.UnifiedObject Prototype)
		{
			if (Prototype is ObjectManager.StaticObject)
			{
				ObjectManager.StaticObject s = (ObjectManager.StaticObject)Prototype;
				return GetMirroredStaticObject(s);
			}
			else if (Prototype is ObjectManager.AnimatedObjectCollection)
			{
				ObjectManager.AnimatedObjectCollection a = (ObjectManager.AnimatedObjectCollection)Prototype;
				ObjectManager.AnimatedObjectCollection Result = new ObjectManager.AnimatedObjectCollection();
				Result.Objects = new ObjectManager.AnimatedObject[a.Objects.Length];
				for (int i = 0; i < a.Objects.Length; i++)
				{
					Result.Objects[i] = a.Objects[i].Clone();
					for (int j = 0; j < a.Objects[i].States.Length; j++)
					{
						Result.Objects[i].States[j].Object = GetMirroredStaticObject(a.Objects[i].States[j].Object);
					}
					Result.Objects[i].TranslateXDirection.X *= -1.0;
					Result.Objects[i].TranslateYDirection.X *= -1.0;
					Result.Objects[i].TranslateZDirection.X *= -1.0;
					Result.Objects[i].RotateXDirection.X *= -1.0;
					Result.Objects[i].RotateYDirection.X *= -1.0;
					Result.Objects[i].RotateZDirection.X *= -1.0;
				}
				return Result;
			}
			else
			{
				return null;
			}
		}
开发者ID:leezer3,项目名称:OpenBVE,代码行数:36,代码来源:CsvRwRouteParser.Objects.cs

示例4: Start

 void Start()
 {
     _gameManager = GameManager.Instance;
     _objectManager = _gameManager.getObjectManager();
     _audioManager = _gameManager.getAudioManager();
     Random.seed = (int)System.DateTime.Now.Ticks;
 }
开发者ID:rubenmv,项目名称:bumpy-ride,代码行数:7,代码来源:PlayerHealth.cs

示例5: Start

 // Use this for initialization
 void Start()
 {
     animator = GetComponent<Animator>();
     objectManager = ObjectManager.GetInstance();
     objectManager.AudioManager.Talking += Talk;
     objectManager.gameState.Damaged += FeelPain;
 }
开发者ID:Final-Parsec,项目名称:Corsair,代码行数:8,代码来源:DonaldAnimator.cs

示例6: DriverSetup

 public override void DriverSetup()
 {
     _mngObject = gobSystemManager.GetComponent<ObjectManager>();
     transMyTransform = gameObject.transform;
     _mngObject.RegisterObject(gameObject, this);
     AdditionalSetup();
 }
开发者ID:thomasslee97,项目名称:musicvisualizer,代码行数:7,代码来源:ObjectDriver.cs

示例7: SpawnManager

 public SpawnManager(Game game, SpriteBatch batch)
 {
     this.game = game;
     spriteBatch = batch;
     objectManager = (ObjectManager) game.Services.GetService((typeof(ObjectManager)));
     collisionManager = (IManageCollisionsService)game.Services.GetService((typeof(IManageCollisionsService)));
     nextTime = random.Next(0, 10);
 }
开发者ID:midlas10,项目名称:XNA_mappe3_Bouncing,代码行数:8,代码来源:SpawnManager.cs

示例8: TableDelete

 public void TableDelete() {
     var result = new ObjectManager<Favorite>( new[] { new Favorite() } );
     result.Delete( result.First() );
     Assert.AreEqual( 0, result.Count() );
     Assert.AreEqual( 0, result.Inserted.Count() );
     Assert.AreEqual( 0, result.Updated.Count() );
     Assert.AreEqual( 1, result.Deleted.Count() );
 }
开发者ID:netcasewqs,项目名称:nlite,代码行数:8,代码来源:TableTest.cs

示例9: Start

    void Start()
    {
        _ObjectManager = ObjectManager.GetInstance();
        destinationNode = GetNodeFromLocation(destinationTransform.position);
        enemySpawnNode = GetNodeFromLocation(enemySpawnTransform.position);

        CreateEnemies();
    }
开发者ID:longlostbro,项目名称:TowerDefense,代码行数:8,代码来源:Map.cs

示例10: InitializeManager

 public static void InitializeManager()
 {
     CharacterMgr = CharacterStore.GetInstance();
     ObjectMgr = ObjectManager.GetInstance();
     SkillMgr = SkillManager.GetInstance();
     SpellMgr = SpellManager.GetInstance();
     WorldMgr = WorldManager.GetInstance();
 }
开发者ID:boredtodeath,项目名称:Arctium,代码行数:8,代码来源:Globals.cs

示例11: LoadContent

 public void LoadContent()
 {
     Art = game.Content.Load<Texture2D>(@"Pictures/beam_wall");
     collisionBox.Width = (int)_size.X;
     collisionBox.Height = (int)_size.Y;
     _sourceRectangle = new Rectangle(0, 0, 80, 1024);
     objectManager = (ObjectManager)game.Services.GetService(typeof(ObjectManager));
     collisionManager = (IManageCollisionsService)game.Services.GetService((typeof(IManageCollisionsService)));
 }
开发者ID:Sebbe,项目名称:The-Cloning-Game,代码行数:9,代码来源:Wall.cs

示例12: InitializeManager

 public static void InitializeManager()
 {
     DataMgr = DataManager.GetInstance();
     ObjectMgr = ObjectManager.GetInstance();
     SkillMgr = SkillManager.GetInstance();
     SpawnMgr = SpawnManager.GetInstance();
     SpellMgr = SpellManager.GetInstance();
     WorldMgr = WorldManager.GetInstance();
 }
开发者ID:CastielS,项目名称:Mists-of-Pandaria,代码行数:9,代码来源:Globals.cs

示例13: Init

 public void Init()
 {
     objectHistory = InfiniteObjectHistory.instance;
     objectManager = ObjectManager.instance;
     moveDirection = Vector3.up;
     slotCount = objectManager.slotCount;
     spawnDirection = Vector3.up;
     activeSlots = GetStartingSlot();
 }
开发者ID:DoYouEven,项目名称:LeapFramework,代码行数:9,代码来源:ObjectGenerator.cs

示例14: Start

 void Start()
 {
     ladderLayer = LayerMask.NameToLayer("Ladder");
     gameManager = GameManager.instance ;
     objectGenerator = ObjectGenerator.instance;
     objectManager = ObjectManager.instance;
     targetSlot = objectManager.GetStartingSlot();
     targetPosition = new Vector2(objectGenerator.IndexToGlobalPosition(targetSlot).x, -objectGenerator.horizon/2);
     transform.position = targetPosition;
 }
开发者ID:DoYouEven,项目名称:LeapFramework,代码行数:10,代码来源:PlayerController.cs

示例15: Start

 void Start()
 {
     if (instance == null){
         instance = this;
     }else {
         Destroy(this.gameObject);
         Debug.Error("core", "Second ObjectManager detected. Deleting gameOject.");
         return;
     }
 }
开发者ID:chicostategamestudios,项目名称:qk-pop,代码行数:10,代码来源:ObjectManager.cs


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