public ObjectAccessItem(int userID, BaseObject obj) : this() { this.CreatorID = userID; this.Users = new List<UserAccess>(); this.Object = new LinkBaseObject(obj); }
public void moveTo(BaseObject target) { if (_currentState == PlayerState.DEFAULT) { if (_activeTarget != null && target.pointInGraph == _activeTarget.pointInGraph) { _activeTarget.onAction(); } else { _activeTarget = target; setState(PlayerState.MOVING); _navigator.startRoute(_activeTarget); } } else { if (_targetsStack.Count > 0) { BaseObject item = (BaseObject)_targetsStack[0]; if(item.pointInGraph == target.pointInGraph) return; } else if (_activeTarget.pointInGraph == target.pointInGraph) { return; } _targetsStack.Add(target); } }
public TileWithObject(Tile t, BaseObject baseObject, bool resize = false) : base(t.TexturePath, t.Rectangle) { if (baseObject == null) return; Put(baseObject, resize); }
void OnTriggerExit( Collider other ) { BaseObject bo = other.GetComponentInChildren<BaseObject>(); if ( bo && bo == sensedObject ) sensedObject = null; }
public bool CheckCollision(Rectangle rectangle, out Animation outAnimation, out BaseObject outBaseObject, string id) { outAnimation = null; outBaseObject = null; foreach (var baseObject in _entities) { if(baseObject == null) continue; if(baseObject.Id == id) continue; var sprite = baseObject.GetComponent<Sprite>(ComponentType.Sprite); if(sprite == null) continue; if (sprite.Rectangle.Intersects(rectangle)) { outAnimation = baseObject.GetComponent<Animation>(ComponentType.Animation); outBaseObject = baseObject; return true; } } return false; }
public Level(ContentManager content, BaseObject player) { _entities = new List<LevelEntity>(); _content = content; _player = player; ManagerInput.FireNewInput += ManagerInput_FireNewInput; }
void hit(BaseObject.objectType t) { if (tx > 1) tx = 0; tx += 1f / 2; moveBoss(); }
public bool CheckCollision(Rectangle rectangle, out Animation outAnimation, out BaseObject outBaseObject, string id, bool checkOnlyHostile=false) { outAnimation = null; outBaseObject = null; foreach (var baseObject in _entities) { if(baseObject == null) continue; if(baseObject.Id != null && baseObject.Id == id) continue; var sprite = baseObject.GetComponent<Sprite>(); if(sprite == null) continue; if (sprite.Rectangle.Intersects(rectangle)) { if(checkOnlyHostile) if (!baseObject.Hostile) continue; outAnimation = baseObject.GetComponent<Animation>(); outBaseObject = baseObject; return true; } } return false; }
public override void LoadContent(ContentManager content) { _managerMap.LoadContent(); var player = new BaseObject {Id = "player"}; player.AddComponent(new Sprite(content.Load<Texture2D>("link_full"), 16, 16, new Vector2(50, 50))); player.AddComponent(new PlayerInput(ManagerScreen,_managerPlayer)); player.AddComponent(new Animation(16, 16,2)); player.AddComponent(new Collision(_managerMap,_entities)); player.AddComponent(new Camera(_managerCamera)); player.AddComponent(new Equipment(content,_managerMap,_managerCamera,_entities)); player.GetComponent<Equipment>(ComponentType.Equipment).AddItem(new Boomerang()); player.GetComponent<Equipment>(ComponentType.Equipment).AddItem(new Sword(_entities)); player.GetComponent<Equipment>(ComponentType.Equipment).EquipItemInSlot(1,ItemSlot.A); player.GetComponent<Equipment>(ComponentType.Equipment).EquipItemInSlot(2, ItemSlot.B); player.AddComponent(new Damage(_entities,true)); player.AddComponent(FactoryStats.GetStats("Link")); player.AddComponent(new GUI()); player.GetComponent<GUI>(ComponentType.GUI).LoadContent(content); //var testNPC = new BaseObject(); //testNPC.AddComponent(new Sprite(content.Load<Texture2D>("Marin"), 16, 16, new Vector2(50, 50))); //testNPC.AddComponent(new AIMovementRandom(200)); //testNPC.AddComponent(new Animation(16, 16)); //testNPC.AddComponent(new Collision(_managerMap)); //testNPC.AddComponent(new Camera(_managerCamera)); _entities.AddEntity(player); //for (int n = 0; n < 3; n++) //{ // var testEnemy = new BaseObject {Id = string.Format("enemy_{0}", n)}; // testEnemy.AddComponent(new Sprite(content.Load<Texture2D>("Octorok"), 16, 16, new Vector2(50 + ManagerFunction.Random(10,20), 50 + ManagerFunction.Random(10,20)))); // testEnemy.AddComponent(new AIMovementRandom(1000, 0.5f)); // testEnemy.AddComponent(new Animation(16, 16, 2)); // testEnemy.AddComponent(new Collision(_managerMap)); // testEnemy.AddComponent(new Octorok(player, content.Load<Texture2D>("Octorok_bullet"), _managerMap)); // testEnemy.AddComponent(new Camera(_managerCamera)); // testEnemy.AddComponent(new Damage(_entities)); // testEnemy.AddComponent(FactoryStats.GetStats("Octorok")); // _entities.AddEntity(testEnemy); //} //_entities.AddEntity(testNPC); //Script test! //var testEnemy = new BaseObject { Id = string.Format("enemy_{0}", "script") }; //testEnemy.AddComponent(new Sprite(content.Load<Texture2D>("Octorok"), 16, 16, new Vector2(50 + ManagerFunction.Random(10, 20), 50 + ManagerFunction.Random(10, 20)))); //testEnemy.AddComponent(new AIMovementRandom(1000, 0.5f)); //testEnemy.AddComponent(new Animation(16, 16, 2)); //testEnemy.AddComponent(new Collision(_managerMap,_entities)); //testEnemy.AddComponent(new Octorok(player, content.Load<Texture2D>("Octorok_bullet"), _managerMap,_entities)); //testEnemy.AddComponent(new Camera(_managerCamera)); //testEnemy.AddComponent(new Damage(_entities)); //testEnemy.AddComponent(FactoryStats.GetStats("Octorok")); //testEnemy.AddComponent(new Script("script_time_test")); //_entities.AddEntity(testEnemy); //Just for test //var window = new WindowMessage("Hello, this is a message! This is a long message",content); //ManagerWindow.NewWindow("test_message",window); }
private void CreateObject(Enemy enemy) { var baseObject = new BaseObject { Username = enemy.UniqueId.ToString()}; baseObject.AddComponent(new Sprite(_texture, 32, 32, new Vector2(enemy.Position.ScreenXPosition, enemy.Position.ScreenYPosition), Color.Black, enemy.Position.Visible)); baseObject.AddComponent(new Animation(16, 16, 2)); //Later we add specific component for enemies here. _enemies.Add(baseObject); }
public void CreateObject() { //Arrange var obj = new BaseObject(); //Assert Assert.IsTrue(obj.Id != Guid.Empty); }
// void OnTriggerStay( Collider other ) // { // OnTriggerEnter( other ); // } void Update() { if ( typeFilter != null && sensedObject != null ) { if ( sensedObject.GetComponent( typeFilter ) == null ) sensedObject = null; } }
public OctorokBullet(Sprite sprite, Collision collision, BaseObject player, Direction direction) { _sprite = sprite; _player = player; _direction = direction; _speed = 1.5f; _collision = collision; }
public static SmsTextingException Build(BaseObject details) { String message = ""; if (details != null && details.Errors != null) { message = details.Errors.Aggregate((current, next) => current + "; " + next); } return new SmsTextingException(message, details); }
public Octorok(BaseObject player,Texture2D bulletTexture, ManagerMap map, int cooldown = 1000 ) { _player = player; _bullets = new List<OctorokBullet>(); _cooldown = cooldown; _counter = 0; _bulletTexture = bulletTexture; _map = map; }
public static bool IsLockedFor(string nodeName, BaseObject obj){ SceneNode node = null; if (allNodes.ContainsKey(nodeName)) node =allNodes[nodeName]; if (node != null) return (node.Locked && node.LockingObject()!=obj); else { // we could search for a game object of this name with a navNode child and add the component here... return false; // what to return if not found } }
public static void UnlockNode(string nodeName, BaseObject locker=null){ if (nodeName == "") return; if (!allNodes.ContainsKey(nodeName)){ Debug.LogWarning(nodeName+" not found in All Nodes list"); return; } SceneNode node = allNodes[nodeName]; if (node != null) node.UnlockBy(locker); // null unlocker might be a problem. how should we handle ? }
public void ResetState() { transform.position = startPosition; transform.localScale = startScale; iTween.ScaleFrom( gameObject, iTween.Hash ( "scale", Vector3.zero, "easetype", iTween.EaseType.easeOutBack, "time", 0.33f, "delay", Random.Range (0, 0.5f) ) ); state = FallingFloor.State.IDLE; objectOnTop = null; }
public virtual void AddNextAI(eAIStateType nextStateType, BaseObject targetObject = null, Vector3 position = new Vector3()) { stNextAI nextAi = new stNextAI(); nextAi.m_StateType = nextStateType; nextAi.m_TargetObject = targetObject; nextAi.m_Position = position; m_listNextAi.Add(nextAi); }
private void BaseObject_onHitBose(BaseObject.objectType o) { if (o == BaseObject.objectType.Enemy) { noEnemiesThatHitBoss++; bossAnimator.OnEnemyHit(); if (onEnemyHit != null) onEnemyHit(); } }
public void CreateObject(BaseObject newObject) { if (this.containedObject != null) { this.containedObject.Recycle(); } this.containedObject = newObject; this.ParentChunk.SetCellDirty(this); }
public static void Edit(BaseObject obj) { Health += obj.Health; SpeedMove += obj.SpeedMove; XP += obj.Xp; obj.Gun.AddGun(); // Health += obj.Health; // Health += obj.Health; }
public LinkBaseObject(BaseObject obj) { if (obj != null) { Type objType = obj.GetType().GetBaseObjectType(); this.ID = obj.ID; this.FullName = objType.FullName; this.Assembly = objType.Assembly.FullName; } }
protected override void GenerateMessage(BaseObject obj) { var block = obj as Block; StartDate = block.StartDate; EndDate = block.EndDate; Rotations = new List<RotationMessage>(); foreach (var rotation in block.Rotations) { Rotations.Add(new RotationMessage(rotation)); } }
public void AddDrawling(string key, BaseObject drawling) { if (string.IsNullOrWhiteSpace(key) || drawlings.ContainsKey(key)) return; if (drawling.Rectangle == null) return; UpDateOldDrawlings(); drawlings.Add(key, drawling); }
internal static void AddEntity(long entityId, BaseObject entity) { //m_resourceLock.AcquireExclusive(); if (m_entityMap.ContainsKey(entityId)) return; m_entityMap.Add(entityId, entity); //m_resourceLock.ReleaseExclusive(); }
/// <summary> /// Adds the specified <paramref name="entity" /> to the <see cref="GameEntityManager"/> /// </summary> /// <param name="entityId">The numeric ID of the entity to add.</param> /// <param name="entity">The entity to add.</param> /// <exception cref="ArgumentNullException">The value of 'entity' cannot be null. </exception> /// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</exception> /// <remarks>Until a locking mechanism is respected, duplicate keys are still technically possible.</remarks> internal static void AddEntity( long entityId, BaseObject entity ) { //_resourceLock.AcquireExclusive(); if ( entity == null ) throw new ArgumentNullException( "entity", "Specified entity cannot be null." ); if ( !_entityMap.ContainsKey( entityId ) ) _entityMap.Add( entityId, entity ); //_resourceLock.ReleaseExclusive(); }
public static BaseObject GetMouseOnClick( IKeyboardMouse input) { BaseObject mouseRect = null; if (input.GameMouse.LeftButton == ButtonState.Pressed && input.OldMouse.LeftButton == ButtonState.Released) mouseRect = new BaseObject(string.Empty, new Microsoft.Xna.Framework.Rectangle( input.GameMouse.X, input.GameMouse.Y, 1, 1)); return mouseRect; }
public void Put(BaseObject objectInTile, bool resize = true) { if (objectInTile == null) return; this.objectInTile = objectInTile; this.Empty = false; if(resize) this.objectInTile.Rectangle = this.Rectangle; this.objectInTile.UpdatePosition(this.Rectangle.X, this.Rectangle.Y); }
public Level2(ContentManager contentManager, BaseObject player) : base(contentManager, player) { _background = _content.Load<Texture2D>("Level2-Background"); _booth = _content.Load<Texture2D>("Level2-Booth"); _wall = _content.Load<Texture2D>("Level2-FrontWall"); _handle = _content.Load<Texture2D>("Level2-Handle"); _lamp = _content.Load<Texture2D>("Level2-Lamp"); _blobForegroundParts = _content.Load<Texture2D>("Level2-BlobForegroundParts"); _graph = new GraphWithHoles(FormPolygon(), 89); InitializeEntities(); }
/// <summary> /// Delete this object of type <code>MultiplePathUserPost</code> /// </summary> /// <returns> A MultiplePathUserPost object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public MultiplePathUserPost Delete() { return(BaseObject.Execute("84910aee-b8c5-4d86-b84c-0dc822e6937d", this)); }
/// <summary> /// Delete an object of type <code>MultiplePathUserPost</code> /// </summary> /// <param name="id">The unique identifier which is used to identify an MultiplePathUserPost object.</param> /// <returns> A MultiplePathUserPost object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static MultiplePathUserPost Delete(String id) { return(BaseObject.Execute("84910aee-b8c5-4d86-b84c-0dc822e6937d", new MultiplePathUserPost(new RequestMap("id", id)))); }
public GameDTO(ASObject obj) : base(obj) { BaseObject.SetFields(this, obj); }
protected void InternalBroadcastPower( ) { BaseObject.InvokeEntityMethod(m_backingObject, GyroNetworkManagerBroadcastPowerMethod, new object[] { m_parent.GyroPower }); }
/// <summary> /// Retrieves a list of type <code>MultiplePathUserPost</code> /// </summary> /// <returns> A list MultiplePathUserPost of objects </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static List <MultiplePathUserPost> List() { return(BaseObject.ExecuteForList("769e324e-d45c-4164-9771-f25a1531fa36", new MultiplePathUserPost())); }
internal void BroadcastDampenersStatus(bool status) { BaseObject.InvokeEntityMethod(BackingObject, ShipControllerNetworkManagerBroadcastDampenersStatus, new object[] { status }); }
public FellowPlayerInfo(ASObject obj) : base(obj) { BaseObject.SetFields(this, obj); }
/// <summary> /// Delete this object of type <code>User</code> /// </summary> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public User Delete() { return(BaseObject.Execute("db10ab01-2198-4abf-ade1-3868cfb3d01c", this)); }
/// <summary> /// Delete an object of type <code>User</code> /// </summary> /// <param name="id">The unique identifier which is used to identify an User object.</param> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static User Delete(String id) { return(BaseObject.Execute("db10ab01-2198-4abf-ade1-3868cfb3d01c", new User(new RequestMap("id", id)))); }
/// <summary> /// Creates an object of type <code>User</code> /// </summary> /// <param name="map">A RequestMap containing the required parameters to create a new object</praram> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="SystemException"> </exception> public static User Create(RequestMap map) { return(BaseObject.Execute("a6d7c23b-4b03-4e41-bdbd-6c7c6902d72f", new User(map))); }
/// <summary> /// Updates an object of type <code>User</code> /// </summary> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public User Update() { return(BaseObject.Execute("4a114425-0aed-4805-b820-50e7e3985450", this)); }
/// <summary> /// Retrieves a list of type <code>User</code> using the specified criteria /// </summary> /// <param name="criteria">The criteria set of values which is used to identify the set of records of User object to return</praram> /// <returns> a List of User objects which holds the list objects available. </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static List <User> List(RequestMap criteria) { return(BaseObject.ExecuteForList("9a3e3a35-8aab-4696-90ce-df458a2c5fee", new User(criteria))); }
public void BroadcastCubeBlockRemoveLists( ) { BaseObject.InvokeEntityMethod(m_netManager, CubeGridNetManagerBroadcastCubeBlockRemoveListsMethod); }
protected void InternalBroadcastTargetAngularVelocity( ) { Vector3 newTarget = (Vector3)m_parent.TargetAngularVelocity; BaseObject.InvokeEntityMethod(m_backingObject, GyroNetworkManagerBroadcastTargetAngularVelocityMethod, new object[] { newTarget }); }
/// <summary> /// Updates an object of type <code>MultiplePathUserPost</code> /// </summary> /// <returns> A MultiplePathUserPost object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public MultiplePathUserPost Update() { return(BaseObject.Execute("fb8fb281-ba2e-45c1-9d20-91173aed6995", this)); }
internal StepRelationDataHolder Parse(string uid) { return(BaseObject.ParseKey <StepRelationDataHolder>(uid)); }
private static void SendPreamble(ulong steamId, int num) { //.=cDj6WIzYFodmTa89pvnrADNanH=.SendPreemble BaseObject.InvokeStaticMethod(MyMultipartMessageType( ), MyMultipartMessagePreemble, new object[] { steamId, num }); }
internal void BroadcastMaxLimit(float maxLimit) { BaseObject.InvokeEntityMethod(BackingObject, PistonNetworkManagerBroadcastMaxLimit, new object[] { maxLimit }); }
protected virtual void Start() { _model = beh.ModelData; }
/// <summary> /// Query and Returns one object of type <code>AudiencesSegment</code> /// </summary> /// <param name = "parameters">This is the optional paramter which can be passed to the request.</param> /// <returns> A AudiencesSegment object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static AudiencesSegment Query(RequestMap parameters) { return(BaseObject.Execute("uuid", new AudiencesSegment(parameters))); }
public SummonerData(ASObject obj) : base(obj) { BaseObject.SetFields(this, obj); }
private void Start() { _object = followedGameObject.GetComponent <BaseObject>(); _mesh = followedGameObject.GetComponentInChildren <MeshRenderer>(); _label = this.GetComponentInChildren <Text>(); }
public override void SetData(string strKey, params object[] datas) { if (strKey.Equals(ConstValue.SetData_Status)) { eStateType CurStateType = (eStateType)datas[0]; StatusSprite.GetComponent <UISprite>().spriteName = "rpg icons"; //아래 스프라이트를 저장한 아틀라스 소환. BaseObject SelfType = null; //적의 종류. if (CurStateType == eStateType.STATE_ATTACK) { SelfType = (BaseObject)datas[1]; if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_1") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_SwordSprite; StatusLabel.text = "공격"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_2") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_BowSprite; StatusLabel.text = "공격"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_3") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_AxeSprite; StatusLabel.text = "공격"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_MINI_BOSS") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_BowSprite; StatusLabel.text = "공격"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_BOSS") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_BowSprite; StatusLabel.text = "공격"; } } else if (CurStateType == eStateType.STATE_SPECIAL) { SelfType = (BaseObject)datas[1]; if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_1") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_ShieldSprite; StatusLabel.text = "방어"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_2") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_AvoidSprite; StatusLabel.text = "회피"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_3") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_LeapSprite; StatusLabel.text = "도약"; } //재인이형 부탁해요 else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_BOSS" && SelfType.GetComponent <NonPlayer>().AI.IS_SECOND_SKILL == false) { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_ShieldSprite; StatusLabel.text = "화염발사"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_BOSS" && SelfType.GetComponent <NonPlayer>().AI.IS_SECOND_SKILL == true) { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_ShieldSprite; StatusLabel.text = "알낳기"; } else if (SelfType.GetComponent <NonPlayer>().TEMPLATE_KEY == "ENEMY_MINI_BOSS") { StatusSprite.GetComponent <UISprite>().spriteName = ConstValue.GetData_ShieldSprite; StatusLabel.text = "화염발사"; } } else { StatusLabel.text = ""; } } }
internal void BroadcastVelocity(float velocity) { BaseObject.InvokeEntityMethod(BackingObject, PistonNetworkManagerBroadcastVelocity, new object[] { velocity }); }
/// <summary> /// Delete this object of type <code>User</code> /// </summary> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public User delete200() { return(BaseObject.Execute("f6048a68-7ad7-46a4-8bd9-670641c219ac", this)); }
/// <summary> /// Query and Returns one object of type <code>Parameters</code> /// </summary> /// <param name = "parameters">This is the optional paramter which can be passed to the request.</param> /// <returns> A Parameters object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static TokenActivation Create(RequestMap parameters) { return(BaseObject.Execute("uuid", new TokenActivation(parameters))); }
/// <summary> /// Delete an object of type <code>User</code> /// </summary> /// <param name="id">The unique identifier which is used to identify an User object.</param> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public static User delete200(String id) { return(BaseObject.Execute("f6048a68-7ad7-46a4-8bd9-670641c219ac", new User(new RequestMap("id", id)))); }
/// <summary> /// Delete this object of type <code>User</code> /// </summary> /// <returns> A User object </returns> /// <exception cref="ApiCommunicationException"> </exception> /// <exception cref="AuthenticationException"> </exception> /// <exception cref="InvalidRequestException"> </exception> /// <exception cref="NotAllowedException"> </exception> /// <exception cref="ObjectNotFoundException"> </exception> /// <exception cref="SystemException"> </exception> public User delete204() { return(BaseObject.Execute("1bce28cd-c900-41b6-ac86-3232903ada1f", this)); }
protected void InternalBroadcastOverride( ) { BaseObject.InvokeEntityMethod(m_backingObject, GyroNetworkManagerBroadcastOverrideMethod, new object[] { m_parent.GyroOverride }); }
//internal string Publish2(out string title, out string metaDescription, out string metaKeywords) //{ // string html = Publish2(); // title = this.ItemTitle; // metaDescription = this.ItemMetaDescription; // metaKeywords = this.ItemMetaKeywords; // return html; //} public override PostResult HandlePost(CmsPage page, Dictionary <string, string> FormParameters) { this.dataId = (FormParameters.ContainsKey("dataid")) ? Guid.Parse(FormParameters["dataid"]) : Guid.NewGuid(); PostResult result = new PostResult(); string messageLabel = "<ul>"; bool itemValid = true; DataItem item; if (dataId == Guid.Empty) { item = new DataItem(); } else { item = BaseObject.GetById <DataItem>(dataId); } Type dataFieldType = typeof(DataItem); foreach (DataField dataField in this.DataCollection.DataItemFields) { if (FormParameters.ContainsKey(dataField.Name)) { string value = FormParameters[dataField.Name]; if (value == "") { value = dataField.DefaultValue; } if (dataField.FieldRule == FieldRuleEnum.Required) { if (value == "") { messageLabel += "<li>" + dataField.Name + "</li>"; itemValid = false; } } if (dataField.FieldRule == FieldRuleEnum.ReadOnly) { } switch (dataField.FieldType) { case FieldTypeEnum.DropDown: DataLookupValue lookUpValue = BaseObject.GetById <DataLookupValue>(Guid.Parse(value)); dataFieldType.GetProperty(dataField.MappingColumn).SetValue(item, lookUpValue, null); break; case FieldTypeEnum.CheckboxList: string[] selectedLookUpIDs = value.Split(','); foreach (string selectedLookUpID in selectedLookUpIDs) { DataLookupValue lookUpValue1 = BaseObject.GetById <DataLookupValue>(Guid.Parse(selectedLookUpID)); item.LookupValues1.Add(lookUpValue1); } break; default: dataFieldType.GetProperty(dataField.MappingColumn).SetValue(item, value, null); break; } } } if (itemValid) { if (WebSessionHelper.CurrentBitplateUser != null) { item.BitplateUser = WebSessionHelper.CurrentBitplateUser; } if (WebSessionHelper.CurrentSiteUser != null) { item.User = WebSessionHelper.CurrentSiteUser; } item.DataCollection = this.DataCollection; Guid parentGroupId; Guid.TryParse(this.getSetting <string>("SelectGroupID"), out parentGroupId); string strParentGroupID = ""; if (parentGroupId != Guid.Empty && item.ParentGroup == null) { item.ParentGroup = BaseObject.GetById <DataGroup>(parentGroupId); strParentGroupID = parentGroupId.ToString(); } DataItem checkItemNameExist = BaseObject.GetFirst <DataItem>("Name = '" + item.Name + "' AND FK_Parent_Group = '" + strParentGroupID + "'"); if (checkItemNameExist == null || checkItemNameExist != null && checkItemNameExist.ID == this.dataId) { bool isNewItemActive = false; if (item.BitplateUser != null || item.User != null) { isNewItemActive = this.getSetting <bool>("IsNewItemActiveKownUsers"); } else { isNewItemActive = this.getSetting <bool>("IsNewItemActiveUnkownUsers"); } //this.getSetting<bool>("IsNewItemActive"); item.Active = (isNewItemActive) ? ActiveEnum.Active : ActiveEnum.InActive; item.Save(); } else { itemValid = false; messageLabel = "<ul><li>Er bestaat al een item met deze naam in de groep.<li>"; } } ModuleNavigationAction navigationActionDrillDown = this.GetNavigationActionByTagName("{SubmitButton}"); result.ErrorMessage = messageLabel + "</ul>"; result.Success = itemValid; result.NavigationType = navigationActionDrillDown.NavigationType; if (navigationActionDrillDown.NavigationType == NavigationTypeEnum.NavigateToPage) { result.NavigationUrl = navigationActionDrillDown.NavigationPage.GetRewriteUrl(); } else { result.HtmlResult += Regex.Match(this.Content, "{SuccessTemplate}(.*?){/SuccessTemplate}", RegexOptions.Singleline).ToString().Replace("{SuccessTemplate}", "").Replace("{/SuccessTemplate}", ""); } return(result); }