internal static ActorBase CreateNativeActor(ActorInitializationParams actorInfo) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (actorInfo.Id == 0) { throw new ArgumentException("actorInfo.Id cannot be 0!"); } if (actorInfo.ActorPtr == IntPtr.Zero) { throw new ArgumentException("actorInfo.ActorPtr cannot be 0!"); } if (actorInfo.EntityPtr == IntPtr.Zero) { throw new ArgumentException("actorInfo.EntityPtr cannot be 0!"); } #endif var nativeActor = new NativeActor(actorInfo); ScriptManager.Instance.AddScriptInstance(nativeActor, ScriptType.Actor); return(nativeActor); }
internal NativeActor(ActorInitializationParams actorInfo) { Id = new EntityId(actorInfo.Id); this.SetIEntity(actorInfo.EntityPtr); this.SetIActor(actorInfo.ActorPtr); }
internal NativeActor(ActorInitializationParams actorInfo) { this.Id = new EntityId(actorInfo.Id); this.EntityHandle = actorInfo.EntityPtr; this.ActorHandle = actorInfo.ActorPtr; }