protected void AvatarSpawnedHandler(object sender, AvatarSpawnedEventArgs e) { if ((e.SpawnRandom % sNextId) != Id) return; // Ok, we'll handle this one. Actor spawnedActor = GameResources.ActorManager.GetActorById(e.ActorId); TransformComponent tc = Owner.GetComponent<TransformComponent>(ComponentType.Transform); spawnedActor.GetComponent<TransformComponent>(ComponentType.Transform).Transform = tc.Transform; }
protected void AvatarSpawnedHandler(object sender, AvatarSpawnedEventArgs e) { if ((e.SpawnRandom % sNextId) != Id) { return; } // Ok, we'll handle this one. Actor spawnedActor = GameResources.ActorManager.GetActorById(e.ActorId); TransformComponent tc = Owner.GetComponent <TransformComponent>(ComponentType.Transform); spawnedActor.GetComponent <TransformComponent>(ComponentType.Transform).Transform = tc.Transform; }