public Human(WolfActivePlayer player, EntityArea entityArea, bool shouldStartWithTransform) : base(entityArea) { this.player = player; isTransformingFromWolf = shouldStartWithTransform; tranPercent = 0.0f; offsetY = 18f; body = new FContainer(); bodySprite = new FSprite(HumanAnimation.Idle.frames[0]); body.AddChild(bodySprite); bodySprite.color = player.player.color.color + new Color(0.7f,0.7f,0.7f,0.0f); bodySprite.y = offsetY; body.scaleX = player.isFacingLeft ? 1f : -1f; // colorSprite = new FSprite("Arena/Human_Idle1_color"); // colorSprite.color = player.player.color.color; // body.AddChild(colorSprite); shadowSprite = new FSprite("Arena/VillShadow"); shadowSprite.alpha = 0.2f; shadowSprite.scaleX = 1.9f; shadowSprite.scaleY = 1.0f; attackableRect = new TORect(0,0,62,29); healthBar = new HumanHealthBar(this); healthBar.alpha = 0.0f; Go.to(healthBar, 1.0f, new TweenConfig().alpha(1.0f)); float healthPercent = ((float)player.health / (float)Config.HUMAN_MAX_HEALTH); healthBar.SetPercent(healthPercent); }
public Human(WolfActivePlayer player, EntityArea entityArea, bool shouldStartWithTransform) : base(entityArea) { this.player = player; isTransformingFromWolf = shouldStartWithTransform; tranPercent = 0.0f; offsetY = 18f; body = new FContainer(); bodySprite = new FSprite(HumanAnimation.Idle.frames[0]); body.AddChild(bodySprite); bodySprite.color = player.player.color.color + new Color(0.7f, 0.7f, 0.7f, 0.0f); bodySprite.y = offsetY; body.scaleX = player.isFacingLeft ? 1f : -1f; // colorSprite = new FSprite("Arena/Human_Idle1_color"); // colorSprite.color = player.player.color.color; // body.AddChild(colorSprite); shadowSprite = new FSprite("Arena/VillShadow"); shadowSprite.alpha = 0.2f; shadowSprite.scaleX = 1.9f; shadowSprite.scaleY = 1.0f; attackableRect = new TORect(0, 0, 62, 29); healthBar = new HumanHealthBar(this); healthBar.alpha = 0.0f; Go.to(healthBar, 1.0f, new TweenConfig().alpha(1.0f)); float healthPercent = ((float)player.health / (float)Config.HUMAN_MAX_HEALTH); healthBar.SetPercent(healthPercent); }