void _Update(ViGameUnit entity) { if (IsMatch) { if (!entity.IsMatch(_condition)) { _isMatch = false; if (DeleUnMatch != null) { DeleUnMatch(); } } } else { if (entity.IsMatch(_condition)) { _isMatch = true; if (DeleMatch != null) { DeleMatch(); } } } }
public void Start(ViGameUnit entity, ViStateConditionStruct condition) { _condition = condition; _isMatch = entity.IsMatch(_condition); _attachNode.Data = this; }