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) { LayerDepth = 1f, }; AnimationHandler.SetShaderEffect(new PanelLines()); _animationLibrary = new Player_AnimationLibrary(); _animationLibrary.LoadAnimations(AnimationHandler); _controller = Game.GlobalKeyboard; _controller.History = new InputRecord(_controller); _controller.History.InitKBRecord(); State = new Player_State(); _behaviorScript = new Player_BehaviorScript(this); _behaviorScript.SetController(ref _controller); _behaviorScript.InitBehaviors(); AnimationHandler.ChangeAnimation((int)AnimationStates.Idle); AnimationHandler.Facing = Orientation.Right; }
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; }
public override void LoadContent() { Body = CurrentWorld.AddBody(this, Position, Size, false); Body.Category = CollisionCategory.wall; }