コード例 #1
0
ファイル: ActorBase.cs プロジェクト: rookboom/CryMono
        /// <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
ファイル: NativeActor.cs プロジェクト: onath123/CryMono
 internal NativeActor(ActorInfo actorInfo)
 {
     Id = new EntityId(actorInfo.Id);
     this.SetIEntity(actorInfo.EntityPtr);
     this.SetIActor(actorInfo.ActorPtr);
 }
コード例 #3
0
ファイル: NativeActor.cs プロジェクト: rookboom/CryMono
 internal NativeActor(ActorInfo actorInfo)
 {
     Id = new EntityId(actorInfo.Id);
     this.SetEntityHandle(actorInfo.EntityPtr);
     this.SetActorHandle(actorInfo.ActorPtr);
 }