protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var se = Entity.GetComponent<StatusEffectsComponent>(); if (se == null) return false; var seac = this.GetDependency<StatusEffectPropertiesComponent>(); se.ApplyStatusEffect(seac.StatusEffectAttributes); return true; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var pc = Entity.GetComponent<PhysicsComponent>(); if (pc == null) return false; CorvEngine.AudioManager.PlaySoundEffect(LaunchSound); pc.Velocity = LaunchVelocity; return true; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { if(ReloadScene) CorvusGame.Instance.SceneManager.ReloadScenes(false); if (string.IsNullOrEmpty(SpawnID)) CorvusGame.Instance.SceneManager.ChangeScene(NextLevel, false); else CorvusGame.Instance.SceneManager.ChangeScene(NextLevel, false, SpawnID); return true; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var sc = Entity.GetComponent<ScoreComponent>(); sc.Coins += Value; var ftc = Entity.GetComponent<FloatingTextComponent>(); if (ftc != null) ftc.Add("+" + Value.ToString(), Color.Gold); AudioManager.PlaySoundEffect("CoinPickup"); Parent.Dispose(); return true; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var pc = Entity.GetComponent <PhysicsComponent>(); if (pc == null) { return(false); } CorvEngine.AudioManager.PlaySoundEffect(LaunchSound); pc.Velocity = LaunchVelocity; return(true); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var se = Entity.GetComponent <StatusEffectsComponent>(); if (se == null) { return(false); } var seac = this.GetDependency <StatusEffectPropertiesComponent>(); se.ApplyStatusEffect(seac.StatusEffectAttributes); return(true); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var dc = Entity.GetComponent<DamageComponent>(); if (dc == null) return false; if (!UseAttributes) dc.TakeDamage(this.Parent, Damage); else { var attri = this.GetDependency<AttributesComponent>(); dc.TakeDamage(attri); } return true; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var sc = Entity.GetComponent <ScoreComponent>(); sc.Coins += Value; var ftc = Entity.GetComponent <FloatingTextComponent>(); if (ftc != null) { ftc.Add("+" + Value.ToString(), Color.Gold); } AudioManager.PlaySoundEffect("CoinPickup"); Parent.Dispose(); return(true); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { if (!IsEnabled) { return(false); } //TODO: WIll need to make it randomize if NextScene is not set. //if (string.IsNullOrEmpty(NextScene)) // return false; //ScrollerGame.Instance.GameStateManager.PushState<LevelClearState>(true); var sceneManager = ScrollerGame.Instance.GetGameState <SceneManager>(); sceneManager.RandomScene(false); //sceneManager.ChangeScene(NextScene, "", false); return(true); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { if (ReloadScene) { CorvusGame.Instance.SceneManager.ReloadScenes(false); } if (string.IsNullOrEmpty(SpawnID)) { CorvusGame.Instance.SceneManager.ChangeScene(NextLevel, false); } else { CorvusGame.Instance.SceneManager.ChangeScene(NextLevel, false, SpawnID); } return(true); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var ec = Entity.GetComponent<EquipmentComponent>(); if (ec == null) return false; var ac = this.GetDependency<AttributesComponent>(); var cpc = this.GetDependency<CombatPropertiesComponent>(); var wdc = this.GetDependency<WeaponPropertiesComponent>(); var seac = Parent.GetComponent<StatusEffectPropertiesComponent>(); ec.EquipWeapon(new Weapon(wdc.WeaponData, cpc.CombatProperties, ac.Attributes, seac.StatusEffectAttributes)); var ftc = Entity.GetComponent<FloatingTextComponent>(); ftc.Add(wdc.WeaponData.Name, Color.Black); CorvEngine.AudioManager.PlaySoundEffect("WeaponPickup"); return true; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { bool colGood = false; //Apply normal damage. var dc = Entity.GetComponent <DamageComponent>(); if (dc != null) { dc.TakeDamage(AttributesComponent); colGood = true; } var mc = Entity.GetComponent <MovementComponent>(); if (mc != null) { mc.Knockback(AttributesComponent.TotalKnockback, (PC.VelocityX > 0) ? 1 : -1); colGood = true; } //Apply status effect if it can. if (CPComponent.AppliesEffect) { var sc = Entity.GetComponent <StatusEffectsComponent>(); if (sc != null) { sc.ApplyStatusEffect(SEAComponent.StatusEffectAttributes); colGood = true; } } //Make an aoe appear if there should be one. if (CPComponent.IsAoE) { AreaOfEffectComponent.CreateAoEEntity(this.Parent); colGood = true; } if (!string.IsNullOrEmpty(CPComponent.ProjectileOnHitSound)) { AudioManager.PlaySoundEffect(CPComponent.ProjectileOnHitSound); } return(colGood); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var mc = Entity.GetComponent<MovementComponent>(); if (mc == null) return false; if ((DateTime.Now - _LastKnockback).TotalMilliseconds > KnockbackTimeout) { _LastKnockback = DateTime.Now; float myx = Entity.Position.X - Parent.Position.X; float kb = (!UseAttributes) ? Knockback : this.GetDependency<AttributesComponent>().TotalKnockback; mc.Knockback(kb, (myx > 0) ? 1 : -1); return true; } else { return false; } }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var dc = Entity.GetComponent <DamageComponent>(); if (dc == null) { return(false); } if (!UseAttributes) { dc.TakeDamage(this.Parent, Damage); } else { var attri = this.GetDependency <AttributesComponent>(); dc.TakeDamage(attri); } return(true); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var mc = Entity.GetComponent <MovementComponent>(); if (mc == null) { return(false); } if ((DateTime.Now - _LastKnockback).TotalMilliseconds > KnockbackTimeout) { _LastKnockback = DateTime.Now; float myx = Entity.Position.X - Parent.Position.X; float kb = (!UseAttributes) ? Knockback : this.GetDependency <AttributesComponent>().TotalKnockback; mc.Knockback(kb, (myx > 0) ? 1 : -1); return(true); } else { return(false); } }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { bool colGood = false; //Apply normal damage. var dc = Entity.GetComponent<DamageComponent>(); if (dc != null) { dc.TakeDamage(AttributesComponent, CPComponent.AoEDamagePercent); colGood = true; } //Apply status effect if it can. if (CPComponent.AppliesEffect) { var sc = Entity.GetComponent<StatusEffectsComponent>(); if (sc != null) { sc.ApplyStatusEffect(SEAComponent.StatusEffectAttributes); colGood = true; } } return colGood; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { bool colGood = false; //Apply normal damage. var dc = Entity.GetComponent <DamageComponent>(); if (dc != null) { dc.TakeDamage(AttributesComponent, CPComponent.AoEDamagePercent); colGood = true; } //Apply status effect if it can. if (CPComponent.AppliesEffect) { var sc = Entity.GetComponent <StatusEffectsComponent>(); if (sc != null) { sc.ApplyStatusEffect(SEAComponent.StatusEffectAttributes); colGood = true; } } return(colGood); }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { var ec = Entity.GetComponent <EquipmentComponent>(); if (ec == null) { return(false); } var ac = this.GetDependency <AttributesComponent>(); var cpc = this.GetDependency <CombatPropertiesComponent>(); var wdc = this.GetDependency <WeaponPropertiesComponent>(); var seac = Parent.GetComponent <StatusEffectPropertiesComponent>(); ec.EquipWeapon(new Weapon(wdc.WeaponData, cpc.CombatProperties, ac.Attributes, seac.StatusEffectAttributes)); var ftc = Entity.GetComponent <FloatingTextComponent>(); ftc.Add(wdc.WeaponData.Name, Color.Black); CorvEngine.AudioManager.PlaySoundEffect("WeaponPickup"); return(true); }
/// <summary> /// Called when a collision with the specified Entity of the given Classification occurs. /// Returns whether or not the collision was valid, causing this object to be disposed if DisposeOnCollision was true. /// </summary> protected abstract bool OnCollision(Entity Entity, EntityClassification Classification);
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { bool colGood = false; //Apply normal damage. var dc = Entity.GetComponent<DamageComponent>(); if (dc != null) { dc.TakeDamage(AttributesComponent); colGood = true; } var mc = Entity.GetComponent<MovementComponent>(); if (mc != null) { mc.Knockback(AttributesComponent.TotalKnockback, (PC.VelocityX > 0) ? 1 : -1); colGood = true; } //Apply status effect if it can. if (CPComponent.AppliesEffect) { var sc = Entity.GetComponent<StatusEffectsComponent>(); if (sc != null) { sc.ApplyStatusEffect(SEAComponent.StatusEffectAttributes); colGood = true; } } //Make an aoe appear if there should be one. if (CPComponent.IsAoE) { AreaOfEffectComponent.CreateAoEEntity(this.Parent); colGood = true; } if (!string.IsNullOrEmpty(CPComponent.ProjectileOnHitSound)) AudioManager.PlaySoundEffect(CPComponent.ProjectileOnHitSound); return colGood; }
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { throw new NotImplementedException(); }
/// <summary> /// Called when a collision with the specified Entity of the given Classification occurs. /// Returns whether or not the collision was valid, causing this object to be disposed if DisposeOnCollision was true. /// </summary> protected abstract bool OnCollision(Entity Entity, EntityClassification Classification);
protected override bool OnCollision(Entity Entity, EntityClassification Classification) { throw new NotImplementedException(); }
public async Task <List <OrganizationExtended> > GetExtendedOrganizationUnitsAsync(User user, EntityClassification entityClassificationId) { var query = await(from uou in UserOrganizationUnitRepository.GetAll() join ou in OrganizationExtendedUnitRepository.GetAll() on uou.OrganizationUnitId equals ou.Id where uou.UserId == user.Id && ou.EntityClassificationId == entityClassificationId select ou).ToListAsync(); return(query); }