Example #1
0
    public Wolf(WolfActivePlayer player, EntityArea entityArea)
        : base(entityArea)
    {
        this.player = player;

        offsetY = 12f;

        body = new FContainer();
        bodySprite = new FSprite(WolfAnimation.Idle.frames[0]);
        body.AddChild(bodySprite);

        bodySprite.color = player.player.color.color + new Color(0.5f,0.5f,0.5f,0.0f);

        bodySprite.y = offsetY;

        body.scaleX = player.isFacingLeft ? 1f : -1f;
        //		colorSprite = new FSprite("Arena/Wolf_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;
    }
Example #2
0
    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);
    }
Example #3
0
    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);
    }
Example #4
0
    public Wolf(WolfActivePlayer player, EntityArea entityArea) : base(entityArea)
    {
        this.player = player;

        offsetY = 12f;

        body       = new FContainer();
        bodySprite = new FSprite(WolfAnimation.Idle.frames[0]);
        body.AddChild(bodySprite);

        bodySprite.color = player.player.color.color + new Color(0.5f, 0.5f, 0.5f, 0.0f);

        bodySprite.y = offsetY;

        body.scaleX = player.isFacingLeft ? 1f : -1f;
//		colorSprite = new FSprite("Arena/Wolf_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;
    }