public Jump(Animator animator, UInput.InputComponet input, Rigidbody2D rigid) : base(animator, input, rigid) { status = new StatusWithAnimFlag(animator); contactChecker = new ContactChecker(); fallingChecker = new FallingChecker(); }
//public bool CheckIfPhoneNumberStartsWith06(Contact item) { // return item.PhoneNumber.StartsWith("06"); //} //Where(CheckIfPhoneNumberStartsWith06) //Where(CheckIfNameStartsWithA) //Where(Add); NO! public ContactsCollection Where(ContactChecker CheckStuff) { ContactsCollection result = new ContactsCollection(); for (int i = 0; i < this.Count; i++) { if (CheckStuff(this[i])) { result.Add(this[i]); } } return(result); }
public List <Contact> Filter(ContactChecker checker) { List <Contact> result = new List <Contact>(); foreach (Contact item in Contacts) { if (checker(item)) { result.Add(item); } } return(result); }