示例#1
0
        void Start()
        {
            jumpingComponents = StaticUtilities.ReturnInterfacesFromComponentsAndAnyControllerStates <IJump>(gameObject);

            foreach (var jump in jumpingComponents)
            {
                jump.OnJump += DoAJump;
            }
        }
        private void SetUpKnockInterface()
        {
            knockTargetsComponents = StaticUtilities.ReturnInterfacesFromComponentsAndAnyControllerStates <IKnockTarget>(gameObject);

            foreach (var knockTarget in knockTargetsComponents)
            {
                knockTarget.OnKnockTarget += KnockingTheTarget;
            }
        }
示例#3
0
        private void SetUpChangeDirectionInterfaces()
        {
            changeDirectionables = StaticUtilities.ReturnInterfacesFromComponentsAndAnyControllerStates <IChangeDirection>(gameObject);

            for (int i = 0; i < changeDirectionables.Length; i++)
            {
                IChangeDirection controller = changeDirectionables[i];
                controller.OnChangeDirection += ChangeDirection;
            }
        }
示例#4
0
 private void SetUpDirectionUpdatables()
 {
     updateDirectionables = StaticUtilities.ReturnInterfacesFromComponentsAndAnyControllerStates <IDirectionUpdateable>(gameObject);
 }