예제 #1
0
            public Sakazaki_Idle(Sakazaki_BehaviorScript behaviorScript) : base(behaviorScript._animationHandler)
            {
                _owner          = behaviorScript._owner;
                _behaviorScript = behaviorScript;
                _body           = behaviorScript._body;

                BehaviorFunctions += CheckIdle;
                BehaviorFunctions += CheckCollision;
            }
예제 #2
0
            public Sakazaki_Knockdown(Sakazaki_BehaviorScript behaviorScript) : base(behaviorScript._animationHandler)
            {
                _behaviorScript = behaviorScript;
                _owner          = behaviorScript._owner;
                _body           = behaviorScript._body;

                _blinkout = new Blinkout();

                BehaviorFunctions += Animate;
            }
예제 #3
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;
        }