Beispiel #1
0
        protected override void init()
        {
            if (collider2DFlippedX != null && collider2D == null)
            {
                throw new UnityException("Only collider2DFlippedX is referenced instead of only collider2D.");
            }

            base.init();

            IGravityFactory gravityFactory = new GravityFactory();

            gravityClient = gravityFactory.getGravityClientPlayer(this);

            setEntity();

            controller = InputFactory.getInstance().getKeyboardInput(keys);

            gravity._reset(gravityClient);

            IAnimationAttributesFactory animationAttribute = new AnimationAttributesFactory();

            animationAttributes = animationAttribute.getAnimationAttributes(this);
        }