/// <summary> /// Initializes a new instance of the <see cref="PlayerEntity"/> class. /// </summary> /// <param name="hide">if set to <c>true</c> [hide].</param> public PlayerEntity(bool hide = false) : base() { this.CurrentState = CharacterState.Standing; this.Velocity = new Vector2(); myAnimationComponent = new AnimationComponent("Idle", this, framNumber, playSpeed, Names, RenderManager.zombieAnimatedAttribute.Width , RenderManager.zombieAnimatedAttribute.Height , RenderManager.zombieAnimatedAttribute.Scale); // Hand Logic //HandChain = new ThrowAbleEntity(this.Position + HandEntry.HndPositionOffSet, this); _hand = new HandEntity(this); // Load Content var texture = myAnimationComponent.LoadContent(); this.Hide = hide; Width = 32f; Height = 32f; this.CollisionComponent = new BoxColliderComponent(this, this.Width, this.Height, CollisionLayers.Player); this.CurrentState = CharacterState.Airbourne; }
//private readonly HandEntity _hand2; /// <summary> /// Initializes a new instance of the <see cref="PlayerEntity"/> class. /// </summary> /// <param name="hide">if set to <c>true</c> [hide].</param> public PlayerEntity(bool hide = false) : base() { //this.CurrentState = CharacterState.Standard; this.Velocity = new Vector2(); _idleAnimationComponent = new AnimationComponent("Idle", this, framNumber, playSpeed, Names, RenderManager.zombieAnimatedAttribute.Width , RenderManager.zombieAnimatedAttribute.Height , RenderManager.zombieAnimatedAttribute.Scale); _noArmsRenderComponent = new RenderComponent("Character_Body_NoArms", this); _noArmsRenderComponent.LoadContent(); _airNoArmsRenderComponent = new RenderComponent("Character_Grapple_InAir", this); _airNoArmsRenderComponent.LoadContent(); _isGrounded = true; _alreadySpawnedDust = false; // Hand Logic _hand = new HandEntity(this, HandEntity.HandID.First); //_hand2 = new HandEntity(this, HandEntity.HandID.Second); this.Anchors = new List <Entity>() { _hand }; // Load Content _idleAnimationComponent.LoadContent(); this.Hide = hide; Width = 32f; Height = 32f; this.CollisionComponent = new BoxColliderComponent(this, this.Width, this.Height, Layers.NonStatic, Tags.Player); }