Example #1
0
        public void Emit(Transform owner, int type, long hurt, bool critical)
        {
            EmitComponent ec;

            if (_componentPool.Count > 0)
            {
                ec = _componentPool.Pop();
            }
            else
            {
                ec = new EmitComponent();
            }
            ec.SetHurt(owner, type, hurt, critical);
        }
Example #2
0
 public void ReturnComponent(EmitComponent com)
 {
     _componentPool.Push(com);
 }