Ejemplo n.º 1
0
 public virtual void AddInfluenceableObject(InfluenceableObject obj)
 {
     if (!influenceableObjects.Contains(obj))
     {
         influenceableObjects.Add(obj);
     }
 }
Ejemplo n.º 2
0
 private void OnTriggerExit(Collider other)
 {
     if (InfluenceableObjectsByCollider.ContainsKey(other))
     {
         InfluenceableObject obj = InfluenceableObjectsByCollider[other];
         RemoveInfluenceableObject(obj);
     }
 }
Ejemplo n.º 3
0
        private void OnTriggerEnter(Collider other)
        {
            if (InfluenceableObjectsByCollider.ContainsKey(other) &&
                (LayersOfInfluence.Count == 0 ||
                 LayersOfInfluence.ContainsAny(InfluenceableObjectsByCollider[other].InfluenceableLayers)))
            {
                InfluenceableObject obj = InfluenceableObjectsByCollider[other];

                AddInfluenceableObject(obj);
            }
        }
Ejemplo n.º 4
0
 protected abstract void Influence(InfluenceableObject obj);
Ejemplo n.º 5
0
 public virtual void RemoveInfluenceableObject(InfluenceableObject obj)
 {
     influenceableObjects.Remove(obj);
 }