예제 #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);
        }
예제 #2
0
 public void ReturnComponent(EmitComponent com)
 {
     _componentPool.Push(com);
 }