Example #1
0
        /// <summary>
        /// Initializes the player.
        /// </summary>
        /// <param name="actorInfo"></param>
        internal virtual void InternalSpawn(ActorInfo actorInfo)
        {
            System.Diagnostics.Contracts.Contract.Requires(actorInfo.ChannelId > 0);
            Id = new EntityId(actorInfo.Id);
            this.SetActorHandle(actorInfo.ActorPtr);
            this.SetEntityHandle(actorInfo.EntityPtr);

            ChannelId = actorInfo.ChannelId;

            // actor must have physics
            Physics.Type = PhysicalizationType.Rigid;

            OnSpawn();
        }
Example #2
0
 internal NativeActor(ActorInfo actorInfo)
 {
     Id = new EntityId(actorInfo.Id);
     this.SetIEntity(actorInfo.EntityPtr);
     this.SetIActor(actorInfo.ActorPtr);
 }
Example #3
0
 internal NativeActor(ActorInfo actorInfo)
 {
     Id = new EntityId(actorInfo.Id);
     this.SetEntityHandle(actorInfo.EntityPtr);
     this.SetActorHandle(actorInfo.ActorPtr);
 }