Esempio n. 1
0
        public override void LoadContent()
        {
            Body = CurrentWorld.AddBody(this, InitPosition, Size);
            Body.ChildHitboxes[Key + "_body"] = new Hitbox(this, new Vector2(0, 0), Size, Key + "_body")
            {
                DebugSprite = Debug.Assets.BlueBox,
                Data        = new CollisionPackage()
                {
                    Value = Key
                }
            };
            AnimationHandler  = new AnimationHandler(this);
            _animationLibrary = new Sakazaki_AnimationLibrary();
            _animationLibrary.LoadAnimations(AnimationHandler);

            State           = new Sakazaki_State();
            State.Facing    = (Game.Rng.Next(0, 2) > 0) ? Orientation.Left : Orientation.Right;
            _behaviorScript = new Sakazaki_BehaviorScript(this);
            _behaviorScript.InitBehaviors();

            AnimationHandler.ChangeAnimation((int)AnimationStates.Idle);
            AnimationHandler.Facing = Orientation.Right;
        }