private bool RetrieveSubstanceOnRect(PlayerSubstanceColliderType colliderType, BoxCollider2D collider) { SubstanceManager.RetrieveSubstances( collider, parent.SubstanceSet, new PlayerSubstanceFilter { ColliderType = colliderType }, groundLayers, out bool touch); return(touch); }
private bool RetrieveSubstanceOnRect(PlayerSubstanceColliderType colliderType, Rect localRect, bool noTouchOnTriggers = false) { SubstanceManager.RetrieveSubstances( localRect.LocalToWorldRect(transform), parent.SubstanceSet, new PlayerSubstanceFilter { ColliderType = colliderType }, groundLayers, out bool touch, noTouchOnTriggers); return(touch); }
private bool RetrieveSubstancePreview(Matrix4x4 trs, SubstanceSet subSet, PlayerSubstanceColliderType colliderType, Rect localRect, bool noTouchOnTriggers = false) { SubstanceManager.RetrieveSubstances( trs.Multiply(localRect), subSet, new PlayerSubstanceFilter { ColliderType = colliderType }, groundLayers, out bool touch, noTouchOnTriggers); return(touch); }
/// <summary> /// Deal damage to this entity. Returns remaining health /// </summary> /// <param name="demageDelt">The amount of damage the attack delt this entity. Must be positive</param> /// //Sebi du hund, wenn du die funktion ersetzt dann lösch sie oder schreib n comment, aber lass sie nich einfach stehn als würde sie benutzt //public float Damage(float damageDelt) //{ // if (damageDelt < 0) // return Health; // if (damageDelt >= Health) // return Health = 0; // return (Health -= damageDelt); //} /// <summary> /// Deal damage to this entity. Returns whether the attack delt damage /// </summary> /// <param name="damageToDeal">The amount of damage the attack delt this entity. Must be positive</param> public bool TryToDamage(float damageToDeal, Substance attackedSubstance = Substance.none_physical) { if (infusedSubstance == Substance.none_physical) { infusedSubstance = attackedSubstance; } else if (infusedSubstance != attackedSubstance) // if the substances are the same, nothing has to be done { SubstanceManager.ReactSubstances(UseInfusedSubstance, attackedSubstance, transform); } if (damageToDeal < 0) { return(false); } float remainingDamageToDeal = damageToDeal; for (int index = 0; index < interruptActions.Count; index++) { //Debug.Log("start block"); interruptActions[index](ref remainingDamageToDeal); if (remainingDamageToDeal <= 0) { return(false); } } if (remainingDamageToDeal >= Health) { Health = 0; remainingDamageToDeal = 0; } Health -= remainingDamageToDeal; return(true); }
public SubstancesService() { _substances = new SubstanceManager(); _elements = new ElementManager(); }
public ChemIndexSpider() { _substances = new SubstanceManager(); }
public CharChemSubstSpider() { _substances = new SubstanceManager(); _categories = new CategoryManager(_substances.GetContext()); }
private void Awake() { inst = this; Effected = Global.GetSelectedEntries(effected); }