private void OnMimicCreated(MimicEntity entity) { GameObject go = ArchetypeLibrary.Instance.Instantiate( entity.State.ArchetypeId); MimicEntityBehaviour obj = go.GetComponent <MimicEntityBehaviour>(); obj.Entity = entity; }
private void OnControllerAdded(IRailControllerServer controller) { ControlledEntity controlled = this.server.AddNewEntity <ControlledEntity>(); controlled.State.ArchetypeId = 0; controller.GrantControl(controlled); controller.ScopeEvaluator = new GameScopeEvaluator(controlled); controller.UserData = controlled; MimicEntity mimic = this.server.AddNewEntity <MimicEntity>(); mimic.State.ArchetypeId = 2; mimic.Bind(controlled, 3.5f, 0.0f); }