コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }