示例#1
0
 public virtual void AddInfluenceableObject(InfluenceableObject obj)
 {
     if (!influenceableObjects.Contains(obj))
     {
         influenceableObjects.Add(obj);
     }
 }
示例#2
0
 private void OnTriggerExit(Collider other)
 {
     if (InfluenceableObjectsByCollider.ContainsKey(other))
     {
         InfluenceableObject obj = InfluenceableObjectsByCollider[other];
         RemoveInfluenceableObject(obj);
     }
 }
示例#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);
            }
        }
示例#4
0
 protected abstract void Influence(InfluenceableObject obj);
示例#5
0
 public virtual void RemoveInfluenceableObject(InfluenceableObject obj)
 {
     influenceableObjects.Remove(obj);
 }