Esempio n. 1
0
 public Jump(Animator animator, UInput.InputComponet input, Rigidbody2D rigid)
 : base(animator, input, rigid)
 {
     status = new StatusWithAnimFlag(animator);
     contactChecker = new ContactChecker();
     fallingChecker = new FallingChecker();
 }
Esempio n. 2
0
        //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);
        }
Esempio n. 3
0
        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);
        }