Example #1
0
 public Sign(World world, List<string> dialogue)
     : base(new RXRect(0, -6, 8, 6), world)
 {
     this.dialogue = dialogue;
     this.shouldSortByZ = false;
     sign = new FSprite("object_sign_01");
     this.AddChild(sign);
     interactIndicator = new InteractInd(0, 7);
     this.AddChild(interactIndicator);
 }
Example #2
0
    public Dialogue()
    {
        dialogueBG = new FSprite("dialogueBG");
        dialogueBG.isVisible = false;
        this.y = -Futile.screen.halfHeight - dialogueBG.height / 2;
        this.AddChild(dialogueBG);

        indicator = new InteractInd(Futile.screen.halfWidth - 12, -7);
        indicator.ignoreTransitioning = true;
        this.AddChild(indicator);

        message = new FLabel(C.smallFontName, "");
        message.alignment = FLabelAlignment.Center;
        this.AddChild(message);
        message.isVisible = false;
    }
Example #3
0
    public Villager(List<string> dialogue, World world, string villagerType = "A")
        : base(new RXRect(0, -6, 10, 8), world)
    {
        this.dialogue = dialogue;
        maxXVel = .5f;
        maxYVel = .5f;
        minYVel = -.5f;
        handleStateCount = true;
        bounceiness = 0f;
        clearAcc = false;

        sprite = new FAnimatedSprite("villager" + villagerType);
        if (villagerType == "A")
        {

            sprite.addAnimation(new FAnimation(VillagerState.MOVING.ToString() + Direction.DOWN, new int[] { 1, 2, 3, 4 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.MOVING.ToString() + Direction.UP, new int[] { 5, 6, 7, 8 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.MOVING.ToString() + Direction.LEFT, new int[] { 9, 10, 11, 12 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.MOVING.ToString() + Direction.RIGHT, new int[] { 9, 10, 11, 12 }, 150, true));

            sprite.addAnimation(new FAnimation(VillagerState.IDLE.ToString() + Direction.DOWN, new int[] { 1 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.IDLE.ToString() + Direction.UP, new int[] { 5 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.IDLE.ToString() + Direction.LEFT, new int[] { 9 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.IDLE.ToString() + Direction.RIGHT, new int[] { 9 }, 150, true));
        }
        else
        {
            walks = false;
            sprite.addAnimation(new FAnimation(VillagerState.MOVING.ToString() + Direction.DOWN, new int[] { 1 }, 150, true));
            sprite.addAnimation(new FAnimation(VillagerState.IDLE.ToString() + Direction.DOWN, new int[] { 1 }, 150, true));
        }

        PlayAnim();
        this.AddChild(sprite);
        indicator = new InteractInd(0, 5);
        this.AddChild(indicator);
    }