Esempio n. 1
0
 public void RemoveConsume(LightConsume c)
 {
     if (consumesHit.Contains(c))
     {
         consumesHit.Remove(c);
     }
 }
Esempio n. 2
0
 public void AddConsume(LightConsume c)
 {
     if (!consumesHit.Contains(c))
     {
         consumesHit.Add(c);
     }
 }
Esempio n. 3
0
        public virtual void Init(LightConsume c)
        {
            consume = c;
            LightConsume lightConsume = consume;

            lightConsume.lightRemoved = (Action <LightBase>)Delegate.Combine(lightConsume.lightRemoved, new Action <LightBase>(OnLightExit));
        }
Esempio n. 4
0
 private void Awake()
 {
     startingHeight = base.transform.localScale;
     netbody        = GetComponent <NetBody>();
     consume        = GetComponent <LightConsume>();
     rb             = GetComponent <Rigidbody>();
     startingMass   = rb.mass;
 }
Esempio n. 5
0
 public virtual void UpdateLight(LightConsume from)
 {
     if (consumesHit.Count > 0)
     {
         foreach (LightConsume item in consumesHit)
         {
             if (from != item)
             {
                 item.Recalculate(this);
             }
         }
     }
 }