本文整理汇总了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);
}
示例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;
}
}
示例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;
}
}
示例4: Start
void Start()
{
_gameManager = GameManager.Instance;
_objectManager = _gameManager.getObjectManager();
_audioManager = _gameManager.getAudioManager();
Random.seed = (int)System.DateTime.Now.Ticks;
}
示例5: Start
// Use this for initialization
void Start()
{
animator = GetComponent<Animator>();
objectManager = ObjectManager.GetInstance();
objectManager.AudioManager.Talking += Talk;
objectManager.gameState.Damaged += FeelPain;
}
示例6: DriverSetup
public override void DriverSetup()
{
_mngObject = gobSystemManager.GetComponent<ObjectManager>();
transMyTransform = gameObject.transform;
_mngObject.RegisterObject(gameObject, this);
AdditionalSetup();
}
示例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);
}
示例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() );
}
示例9: Start
void Start()
{
_ObjectManager = ObjectManager.GetInstance();
destinationNode = GetNodeFromLocation(destinationTransform.position);
enemySpawnNode = GetNodeFromLocation(enemySpawnTransform.position);
CreateEnemies();
}
示例10: InitializeManager
public static void InitializeManager()
{
CharacterMgr = CharacterStore.GetInstance();
ObjectMgr = ObjectManager.GetInstance();
SkillMgr = SkillManager.GetInstance();
SpellMgr = SpellManager.GetInstance();
WorldMgr = WorldManager.GetInstance();
}
示例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)));
}
示例12: InitializeManager
public static void InitializeManager()
{
DataMgr = DataManager.GetInstance();
ObjectMgr = ObjectManager.GetInstance();
SkillMgr = SkillManager.GetInstance();
SpawnMgr = SpawnManager.GetInstance();
SpellMgr = SpellManager.GetInstance();
WorldMgr = WorldManager.GetInstance();
}
示例13: Init
public void Init()
{
objectHistory = InfiniteObjectHistory.instance;
objectManager = ObjectManager.instance;
moveDirection = Vector3.up;
slotCount = objectManager.slotCount;
spawnDirection = Vector3.up;
activeSlots = GetStartingSlot();
}
示例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;
}
示例15: Start
void Start()
{
if (instance == null){
instance = this;
}else {
Destroy(this.gameObject);
Debug.Error("core", "Second ObjectManager detected. Deleting gameOject.");
return;
}
}