示例#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();
        }
示例#2
0
 internal NativeActor(ActorInfo actorInfo)
 {
     Id = new EntityId(actorInfo.Id);
     this.SetIEntity(actorInfo.EntityPtr);
     this.SetIActor(actorInfo.ActorPtr);
 }
示例#3
0
 internal NativeActor(ActorInfo actorInfo)
 {
     Id = new EntityId(actorInfo.Id);
     this.SetEntityHandle(actorInfo.EntityPtr);
     this.SetActorHandle(actorInfo.ActorPtr);
 }