Ejemplo n.º 1
0
 protected override void UpdateTarget()
 {
     base.UpdateTarget();
     if (NPCinfo.target == null)
     {
         if (CompareTag("Ally"))
         {
             TryNewTarget(NPCList.NearestAllEnemy(center));
         }
         if (CompareTag("Enemy"))
         {
             TryNewTarget(NPCList.NearestAllAlly(center));
         }
     }
     else if (NPCinfo.target.target != NPCinfo)
     {
         if (CompareTag("Ally"))
         {
             TryNewTarget(NPCList.NearestFreeEnemy(center));
         }
         if (CompareTag("Enemy"))
         {
             TryNewTarget(NPCList.NearestFreeAlly(center));
         }
     }
 }
        public NPCClass GetNPC(string NpcName)
        {
            if (NPCList.TryGetValue(NpcName, out var myNpc))
            {
                return(myNpc);
            }

            return(null);
        }
Ejemplo n.º 3
0
    public void OnMouseDown()
    {
        can.SetActive(true);
        // Debug.Log("mouse");


        n = new NPCList();
        n.UpdateNPCList();
        // GameObject go = (GameObject)Instantiate(can);
    }
Ejemplo n.º 4
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }

        else if (instance != this)
        {
            Destroy(gameObject);
        }
    }
Ejemplo n.º 5
0
 protected override void UpdateTarget()
 {
     if (NPCinfo.target == null)
     {
         if (CompareTag("Ally"))
         {
             TryNewTarget(NPCList.NearestFreeEnemy(transform));
         }
         if (CompareTag("Enemy"))
         {
             TryNewTarget(NPCList.NearestFreeAlly(transform));
         }
     }
     base.UpdateTarget();
 }
Ejemplo n.º 6
0
        public SlimeHut(Player player, int screenGridWidth, int screenGridHeight, int screenWidth, int screenHeight, GraphicsDevice graphicsDevice)
            : base(player, screenGridWidth, screenGridHeight, screenWidth, screenHeight, graphicsDevice)
        {
            height = 17;
            width  = 28;
            AddBorder();

            for (int i = 1; i < width - 1; i++)
            {
                for (int j = 1; j < height - 1; j++)
                {
                    if (i == 1 || i == 2 || i == width - 2 || i == width - 3 || j == 1 || j == 2)
                    {
                        tiles[i][j] = new Tiles.SlimeBlock(i, j, 12, this);
                    }
                    else if ((i == 3 && j == height - 2) || (i == 3 && j == 3) || (i == width - 4 && j == height - 2) || (i == width - 4 && j == 3))
                    {
                        tiles[i][j] = new Tiles.SlimeBlock(i, j, 12, this);
                    }
                    else if (i == 3)
                    {
                        tiles[i][j] = new Tiles.SlimeBlock(i, j, 9, this);
                    }
                    else if (i == width - 4)
                    {
                        tiles[i][j] = new Tiles.SlimeBlock(i, j, 11, this);
                    }
                    else if (j == 3)
                    {
                        tiles[i][j] = new Tiles.SlimeBlock(i, j, 8, this);
                    }
                    else if (j == height - 2)
                    {
                        tiles[i][j] = new Tiles.SlimeBlock(i, j, 10, this);
                    }
                }
            }

            tiles[15][height - 2] = new Tiles.SlimeBlock(15, height - 2, 12, this);
            tiles[15][height - 3] = new Tiles.SlimeBlock(15, height - 3, 4, this);

            tiles[16][height - 2] = new Tiles.SlimeBlock(16, height - 2, 12, this);
            tiles[16][height - 3] = new Tiles.SlimeBlock(16, height - 3, 5, this);

            NPCList.Add(new NPCs.Wizard(new Vector2(750, 600), this, screenWidth, screenHeight, player));
            spawnPoint = new Vector2(60, 60);
        }
Ejemplo n.º 7
0
    public override IEnumerator Execute()
    {
        var before     = Player.playerInstance.AllowMovement;
        var controller = NPCList.GetNPC(npc);

        Player.playerInstance.AllowMovement = false;

        var cameraFader = Camera.main.GetComponentInChildren <CameraFader>();

        if (!instantTP)
        {
            cameraFader.StartFading();

            yield return(new WaitUntil(() => cameraFader.finishedFading));
        }

        var telePos = (Vector3)TeleportPosition;

        controller.transform.position = telePos + new Vector3(0f, .5f, 0f);
        controller.StallMovement();
        if (facingDirection != SpriteDir.None)
        {
            controller.SetFacingDirection(facingDirection);
        }
        controller.boxCollider.transform.localPosition = Vector3.zero;

        if (KeepCameraInBounds.instance.objectToFollow == controller.gameObject)
        {
            Camera.main.SendMessage("UpdateBounds");
        }

        if (!instantTP)
        {
            cameraFader.StartUnfading();

            yield return(new WaitUntil(() => cameraFader.finishedFading));
        }

        controller.boxCollider.transform.localPosition = Vector3.zero;
        Player.playerInstance.AllowMovement            = before;

        yield return(null);
    }
Ejemplo n.º 8
0
    public override IEnumerator Execute()
    {
        var controller  = NPCList.GetNPC(npc);
        var before      = controller.AllowMovement;
        var beforeSpeed = controller.moveSpeed;

        switch (speed)
        {
        case Speed.OneEighthNormal: controller.moveSpeed = 1f; break;

        case Speed.OneFourthNormal: controller.moveSpeed = 2f; break;

        case Speed.HalfNormal: controller.moveSpeed = 4f; break;

        case Speed.Normal: controller.moveSpeed = 8f; break;

        case Speed.TwiceNormal: controller.moveSpeed = 16f; break;

        case Speed.FourTimesNormal: controller.moveSpeed = 32f; break;
        }

        for (int i = 0; i < times; i++)
        {
            controller.AllowMovement = true;
            controller.SetFacingDirection(controller.DirFromVector(directDir));
            controller.ForceMove(directDir);
            controller.AllowMovement = false;

            if (!noWait)
            {
                yield return(new WaitUntil(() => controller.stoppedOnTile));
            }
        }

        if (!noWait)
        {
            controller.moveSpeed     = beforeSpeed;
            controller.AllowMovement = before;
        }

        yield return(null);
    }
Ejemplo n.º 9
0
 protected override void UpdateTarget()
 {
     base.UpdateTarget();
     if (NPCinfo.target == null)
     {
         if (CompareTag("Ally"))
         {
             TryNewTarget(NPCList.NearestAllEnemy(center));
         }
         if (CompareTag("Enemy"))
         {
             TryNewTarget(NPCList.NearestAllAlly(center));
         }
     }
     if (CompareTag("Ally"))
     {
         foreach (NPCBase tmp in NPCList.enemys)
         {
             TauntEnmey(tmp);
         }
     }
 }
Ejemplo n.º 10
0
    void Update()
    {
        NPCController follower = null;

        if (Global.s.ExtraParkPartyMember == 1)
        {
            follower = NPCList.GetNPC(NPC.Hus);
        }
        else if (Global.s.ExtraParkPartyMember == 2)
        {
            follower = NPCList.GetNPC(NPC.Chi);
        }

        var distance = Vector2.Distance(transform.position, Player.playerInstance.transform.position);

        if (Global.s.ShibeInParty > 0 && Global.s.ShibeAbleToFollow > 0 && controller.standingStill)
        {
            if (distance < 5)
            {
                var beforeFacing = controller.facingDir;
                var dir          = controller.DirFromVector(lastTargetPos - transform.position);
                controller.TryMove(dir, false);

                if (controller.standingStill || Player.playerInstance.standingStill)
                {
                    controller.SetFacingDirection(beforeFacing);
                }
                else if (follower != null && !controller.standingStill)
                {
                    var followerDir = transform.position - follower.transform.position;

                    if (followerDir.magnitude < 5)
                    {
                        follower.SetFacingDirection(follower.DirFromVector(followerDir));
                        follower.ForceMove(followerDir);
                    }
                    else
                    {
                        follower.transform.position = transform.position;
                    }
                }
            }
            else
            {
                //distance is >= 5 tiles, teleport
                if (!Player.playerInstance.standingStill)
                {
                    controller.SetFacingDirection(lastTargetFacing);
                    transform.position = lastTargetPos;
                    if (follower != null)
                    {
                        follower.transform.position = transform.position;
                    }
                }
            }
        }

        if (Global.s.ShibeInParty > 0 && Global.s.ShibeAbleToFollow > 0 && (!Player.playerInstance.standingStill || !lastStandingStill) && distance <= 2.1f)
        {
            var movePercentage = Player.playerInstance.movePercentage;

            if (movePercentage < 1f)
            {
                var pos = Vector3.Lerp(transform.position, controller.boxCollider.transform.position, movePercentage);

                //snap to the 16 pixel grid
                controller.anim.transform.position = new Vector3(((int)(pos.x * 16) / 16f), ((int)(pos.y * 16) / 16f), controller.anim.transform.position.z);

                if (follower != null)
                {
                    var followerPos = Vector3.Lerp(follower.transform.position, follower.boxCollider.transform.position, movePercentage);
                    follower.anim.transform.position = new Vector3(((int)(followerPos.x * 16) / 16f), ((int)(followerPos.y * 16) / 16f), follower.anim.transform.position.z);
                }
            }
            else
            {
                movePercentage     = 1f;
                transform.position = controller.boxCollider.transform.position;
                controller.boxCollider.transform.localPosition = Vector3.zero;
                controller.anim.transform.localPosition        = Vector3.zero;
                controller.standingStill = true;
                controller.stoppedOnTile = true;

                if (follower != null)
                {
                    movePercentage = 1f;
                    follower.transform.position = follower.boxCollider.transform.position;
                    follower.boxCollider.transform.localPosition = Vector3.zero;
                    follower.anim.transform.localPosition        = Vector3.zero;
                    follower.standingStill = true;
                    follower.stoppedOnTile = true;
                }
            }
        }

        Debug.DrawLine(lastTargetPos, lastTargetPos + Vector3.up + Vector3.right);
        lastTargetPos     = Player.playerInstance.transform.position;
        lastTargetFacing  = Player.playerInstance.facingDir;
        lastStandingStill = Player.playerInstance.standingStill;
    }
Ejemplo n.º 11
0
    void check()
    {
        var s     = Global.ActiveSavefile;
        var up    = (Vector3)Vector2.up;
        var right = (Vector3)Vector2.right;
        var down  = (Vector3)Vector2.down;
        var left  = (Vector3)Vector2.left;
        var hus   = NPCList.GetNPC(NPC.Hus);
        var chi   = NPCList.GetNPC(NPC.Chi);

        if (Global.s.DogTalk > 0)
        {
            //yooooo just gonna override all the other stuff so I don't have to worry about figuring out what needs to be moved where
            //not going to be teleporting NPCs around based on variables

            if (s.RedSpace == 2)
            {
                purpleSpacePan.speed = 3f;
            }
            else if (s.RedSpace == 3)
            {
                purpleSpacePan.speed = 6f;
            }
            else if (s.RedSpace == 4)
            {
                purpleSpace.sprite   = purpleSpaceSprite;
                purpleSpacePan.speed = 0f;
            }

            return;
        }

        if (s.SharpeiTalk.value == 3)
        {
            if (s.ShibeInParty > 0)
            {
                NPCList.GetNPC(NPC.Sharpeii).transform.position = new Vector3(18.5f, -55f);
            }
            else
            {
                NPCList.GetNPC(NPC.Sharpeii).transform.position = nullPos;
            }
        }
        else
        {
            NPCList.GetNPC(NPC.Sharpeii).transform.position = new Vector3(21.5f, -56f);
        }

        if (s.DustBunny == 0)
        {
            dustBunny.transform.position = new Vector3(63.5f, 56.5f);
        }
        else
        {
            dustBunny.transform.position = nullPos;
        }

        switch (Global.s.StoneBlockSearch)
        {
        case 0:
        case 1:
        case 2:
        case 3: stoneBlock.sprite = null; break;

        case 4:
        case 5: stoneBlock.sprite = stoneBlockSprites[1]; break;

        case 6: stoneBlock.sprite = stoneBlockSprites[2]; break;

        case 7: stoneBlock.sprite = stoneBlockSprites[3]; break;

        case 8: stoneBlock.sprite = stoneBlockSprites[4]; break;

        case 9: stoneBlock.sprite = stoneBlockSprites[5]; break;
        }

        if (s.ParkState == 0)
        {
            shermanBlock.transform.position = new Vector3(64f, -17.5f);
        }
        else
        {
            shermanBlock.transform.position = nullPos;
        }

        if (s.ParkState == 0)
        {
            closeToSherman.transform.position = new Vector3(64f, -16.5f);
        }
        else
        {
            closeToSherman.transform.position = nullPos;
        }

        if (s.ParkState == 1)
        {
            exitParkTrigger.transform.position = new Vector3(64f, -17.5f);
        }
        else
        {
            exitParkTrigger.transform.position = nullPos;
        }

        if (s.ParkState == 1)
        {
            noLeaveParkTown.transform.position = new Vector3(34.5f, -20f);
        }
        else
        {
            noLeaveParkTown.transform.position = nullPos;
        }

        if (s.ParkState == 1)
        {
            noLeaveParkObservatory.transform.position = new Vector3(51f, -25.5f);
        }
        else
        {
            noLeaveParkObservatory.transform.position = nullPos;
        }

        if (s.ParkState == 2)
        {
            parkFinishedTrigger.transform.position = new Vector3(64.5f, -17.5f);
        }
        else
        {
            parkFinishedTrigger.transform.position = nullPos;
        }

        if (s.ParkState == 2)
        {
            lineBlock.transform.position = nullPos;
        }
        else
        {
            lineBlock.transform.position = new Vector3(66.5f, -21.5f);
        }

        if (s.ParkState > 0)
        {
            chiController.ConstantlyWalk = false;
        }
        else
        {
            chiController.ConstantlyWalk = true;
        }

        if (s.StoneBlockSearch == 3)
        {
            s.ShibeTalk.value = 6;
        }

        if (s.CrestTalk == 4)
        {
            crestHouseExitBlocker.SetActive(true); foreach (var exit in crestHouseExits)
            {
                exit.SetActive(false);
            }
        }
        else
        {
            crestHouseExitBlocker.SetActive(false); foreach (var exit in crestHouseExits)
            {
                exit.SetActive(true);
            }
        }

        if (s.CrestTalk >= 2 && s.CrestTalk <= 4)
        {
            spider.SetActive(true);
        }
        if (s.CrestTalk == 5)
        {
            spider.transform.position = nullPos;
        }
        else if (s.PuddleTalk == 3)
        {
            spider.SetActive(false);
        }

        var crest  = NPCList.GetNPC(NPC.Crest);
        var puddle = NPCList.GetNPC(NPC.Puddle);

        if (s.CrestTalk == 2)
        {
            crest.transform.position  = new Vector3(2.5f, -50f);
            puddle.transform.position = nullPos;
        }

        if (oldCrestTalk != s.CrestTalk)
        {
            var defaultPos = new Vector3(-0.5f, -50f);

            switch (s.CrestTalk)
            {
            case 2: crest.transform.position = defaultPos + (right * 3); break;

            case 7: crest.transform.position = defaultPos + (left * 6); break;

            case 8: crest.transform.position = defaultPos + (left * 6) + (up * 2); break;

            case 9: crest.transform.position = defaultPos + (left * 10) + (up * 9); break;
            }

            oldCrestTalk = s.CrestTalk;
        }

        if (oldPuddleTalk != s.PuddleTalk)
        {
            var defaultPos = new Vector3(-10.5f, -41f);

            switch (s.PuddleTalk)
            {
            case 0:
            case 4: puddle.transform.position = defaultPos; break;

            case 2: puddle.transform.position = defaultPos + (down * 12) + (left * 1); puddle.SetFacingDirection(SpriteDir.Up); break;

            case 3: puddle.transform.position = defaultPos + (down * 11) + (left * 1); break;

            case 5: puddle.transform.position = new Vector3(-0.5f, -50f); break;
            }

            oldPuddleTalk = s.PuddleTalk;
        }

        if (oldParkState != s.ParkState)
        {
            FastFrisbees.SetActive(s.ParkState == 0 || s.ParkState == 1);
            SlowFrisbees.SetActive(s.ParkState == 2);

            if (oldParkState != 2 && s.ParkState == 2)
            {
                NPCList.GetNPC(NPC.Goldie).transform.position  = nullPos;
                NPCList.GetNPC(NPC.Labra).transform.position   = nullPos;
                NPCList.GetNPC(NPC.Sherman).transform.position = nullPos;
                NPCList.GetNPC(NPC.Chi).transform.position     = nullPos;
                NPCList.GetNPC(NPC.Alma).transform.position    = new Vector2(44.5f, -4f);
            }

            oldParkState = s.ParkState;
        }

        if (oldFrisbeeTrap != s.FrisbeeTrap)
        {
            SuperFrisbee.SetActive(s.FrisbeeTrap == 1);
            FrisbeeTrap.SetActive(s.FrisbeeTrap == 1);
            FrisbeeTrapTrigger.SetActive(s.FrisbeeTrap <= 1);

            oldFrisbeeTrap = s.FrisbeeTrap;
        }

        MachineCheckedTrigger.SetActive(Global.s.MachineChecked < 1 && Global.s.ParkState == 1);

        if (oldExtraParty != 2 && s.ExtraParkPartyMember == 2)
        {
            oldExtraParty = 2;

            var oldHusPos  = hus.transform.position;
            var oldHusLook = hus.facingDir;

            hus.transform.position = chi.transform.position;
            hus.SetFacingDirection(SpriteDir.Up);

            chi.transform.position = oldHusPos;
            chi.SetFacingDirection(oldHusLook);
        }

        yellBoundary.SetActive(Global.s.UgTalk <= 1);

        var malty = NPCList.GetNPC(NPC.Malty);

        switch (s.MaltyTalk)
        {
        case 1:
        case 2:
            if (s.ShibeInParty > 0)
            {
                malty.transform.position = new Vector3(96.5f, -51f); malty.SetFacingDirection(s.MaltyTalk == 1 ? SpriteDir.Left : SpriteDir.Right);
            }
            else
            {
                NPCList.GetNPC(NPC.Malty).transform.position = nullPos;
            }
            break;

        case 6:
            malty.transform.position = new Vector3(96.5f, -51f); malty.SetFacingDirection(SpriteDir.Right);
            chi.transform.position   = new Vector3(52.5f, -20f); chi.SetFacingDirection(SpriteDir.Left);
            break;

        default:
            NPCList.GetNPC(NPC.Malty).transform.position = nullPos;
            break;
        }

        var bernard = NPCList.GetNPC(NPC.Bernard);

        switch (s.BernardTalk)
        {
        case 1:
        case 2:
        case 3:
        case 4:
            bernard.transform.position = new Vector3(85.5f, -24f);
            break;

        default:
            bernard.transform.position = nullPos;
            break;
        }

        if (oldCrestStalk != s.CrestStalkFest)
        {
            switch (s.CrestStalkFest)
            {
            case 1:
                crest.transform.position = new Vector3(9.5f, -19f);
                crest.SetFacingDirection(SpriteDir.Down);
                break;

            case 2:
                crest.transform.position = new Vector3(-2.5f, -17f);
                crest.SetFacingDirection(SpriteDir.Right);
                break;

            case 4:
                crest.transform.position = new Vector3(21.5f, -23f);
                crest.SetFacingDirection(SpriteDir.Right);
                break;

            case 6:
                crest.transform.position = new Vector3(47.5f, -20f);
                crest.SetFacingDirection(SpriteDir.Right);

                hus.transform.position = new Vector3(47.5f, -21f);
                hus.SetFacingDirection(SpriteDir.Up);

                chi.transform.position = new Vector3(48.5f, -20f);
                chi.SetFacingDirection(SpriteDir.Left);
                break;

            case 7:
                hus.transform.position = nullPos;
                hus.SetFacingDirection(SpriteDir.Up);

                chi.transform.position = nullPos;
                chi.SetFacingDirection(SpriteDir.Left);
                break;
            }

            oldCrestStalk = s.CrestStalkFest;
        }

        if (s.UgTalk == 2 && s.MaltyTalk < 3 && s.PictureTaken > 0)
        {
            puddle.transform.position = new Vector3(98.5f, -20f);
            puddle.SetFacingDirection(SpriteDir.Left);

            crest.transform.position = new Vector3(99.5f, -20f);
            crest.SetFacingDirection(SpriteDir.Left);
        }

        var pom = NPCList.GetNPC(NPC.Pom);

        if (s.HusTalk == 5)
        {
            hus.transform.position = new Vector3(92.5f, -20f);
            hus.SetFacingDirection(SpriteDir.Right);
        }

        if (s.HusTalk == 6 || s.HusTalk == 9)
        {
            hus.transform.position = nullPos;
            NPCList.GetNPC(NPC.Shibe).transform.position = nullPos;
        }

        if (s.StopPom > 0)
        {
            NPCList.GetNPC(NPC.DavePointer).transform.position = new Vector3(122.5f, 27f);
        }

        var corg = NPCList.GetNPC(NPC.Corg);

        if (s.GateOpened == 0)
        {
            if (s.CorgTalk == 1)
            {
                corg.transform.position = new Vector3(123.5f, -20f);
            }
            else if ((s.CorgTalk == 3 || (s.ShibeInParty == 0 && s.CorgKeys == 1)))
            {
                corg.transform.position = new Vector3(135.5f, -20f);
            }
            else
            {
                corg.transform.position = nullPos;
            }
        }
        else
        {
            corg.transform.position = nullPos;
        }

        var gateClosed = s.GateOpened == 0;

        Gate_Closed.SetActive(gateClosed);
        Gate_Open.SetActive(!gateClosed);

        Gate_ShibeAndHusPile.SetActive(s.StopPom >= 2);

        if (s.HusTalk == 5 && pom.transform.position.x > 103)
        {
            hus.transform.position = new Vector3(119.5f, -20f);
            hus.SetFacingDirection(SpriteDir.Right);
        }

        if (s.HusTalk == 7 || s.HusTalk == 8)
        {
            hus.transform.position = nullPos;
            NPCList.GetNPC(NPC.Shibe).transform.position = nullPos;
        }

        if (s.RedSpace == 1)
        {
            purpleSpace.sprite   = redSpaceSprite;
            purpleSpacePan.speed = .3f;
        }
    }
Ejemplo n.º 12
0
    // Use this for initialization
    void Start()
    {
        if (NPCListObject == null)
        {
            NPCListObject = this;
        }
        else if (NPCListObject != this)
        {
            Destroy(gameObject);
        }

        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Norwood",              // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.05f,                  // Talkspeed between characters
                             0,
                             new string[] { "The situation is a mess..", "Oh, excuse me, I was talking to myself there..", "I haven't seen you around before? Are you wandering around?", "Well I better warn you, there is much going on here, dangerous stuff I tell you!", "Please speak to Elliot Cross, he is our mayor, he will explain the situation.." } // NO QUEST? ADD DIALOGUE
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Elliot Cross",         // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.04f,                  // Talkspeed between characters
                             0,                      // QUEST ID
                             new string[] { "Ah! You look like someone that could help us right now.", "There is a creature that haunts our little island, everyday I hear that people go missing.", "From what I've heard the creature uses dark magic and hides in that big tower in the distance", "I think you should explore the world first before you attempt killing that creature", "Please speak to my collegues next to me, they will help you out" }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Flint Ironhand",       // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.05f,                  // Talkspeed between characters
                             1,                      // QUEST ID
                             new string[] { }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Thadeus",              // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.05f,                  // Talkspeed between characters
                             2,                      // QUEST ID
                             new string[] { }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Griff",                // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.03f,                  // Talkspeed between characters
                             0,                      // QUEST ID
                             new string[] { "Watch your health boy, don't forget to use your items to heal when in danger!", "I sense you also use some kind of magic, use that to get some health when you got plenty energy." }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Suman",                // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.03f,                  // Talkspeed between characters
                             0,                      // QUEST ID
                             new string[] { "You look like you use multiple combat styles, I got some tips for you", "Switching to another combatstyle can be handy in battle, some are more useful " }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Vlad",                 // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.03f,                  // Talkspeed between characters
                             0,                      // QUEST ID
                             new string[] { "You got a nice inventory there, did you know you can open it with key I?" }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Dwuan",                // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.03f,                  // Talkspeed between characters
                             0,                      // QUEST ID
                             new string[] { "To open this door, you need to find the crystals..", "Once you have collected all the crystals you can push through this game" }
                             ));
        DatabaseNPCs.Add(new NPCObject(
                             DatabaseNPCs.Count + 1, // ID
                             "Gwevan",               // NPC Name
                             true,                   // SEX
                             true,                   // INTERACTABLE
                             0.03f,                  // Talkspeed between characters
                             0,                      // QUEST ID
                             new string[] { "Watch where you walk in this country, danger is ahead." }
                             ));
        NPCCount = DatabaseNPCs.Count;
    }
Ejemplo n.º 13
0
        public TestArea(Player player, int screenGridWidth, int screenGridHeight, int screenWidth, int screenHeight, GraphicsDevice graphicsDevice)
            : base(player, screenGridWidth, screenGridHeight, screenWidth, screenHeight, graphicsDevice)
        {
            //enemies.Add(new Enemies.Snail(new Vector2(600, 300), player, this, null, 0));
            NPCList.Add(new NPCs.BusinessMan(new Vector2(300, 200), this));
            List <Enemy> enemyList = new List <Enemy>();

            enemyList.Add(new Enemies.SlimeDrip(new Vector2(51, 51), this, null, 1));
            enemyList.Add(new Enemies.SlimeRegular(new Vector2(0, 0), this, null, 1));
            enemyList.Add(new Enemies.Snail(new Vector2(50, 50), this, null, 1));
            spawners.Add(new Spawner(new Vector2(600, 300), enemyList, this));
            height = 22;
            width  = 30;
            AddBorder();


            tiles[3][3] = new Tiles.BrickWall(3, 3, this);
            tiles[6][6] = new Tiles.BrickWall(6, 6, this);
            tiles[8][8] = new Tiles.BrickWall(8, 8, this);

            tiles[0][10]  = new Tiles.BrickWall(0, 10, this);
            tiles[1][10]  = new Tiles.BrickWall(1, 10, this);
            tiles[2][10]  = new Tiles.BrickWall(2, 10, this);
            tiles[3][10]  = new Tiles.BrickWall(3, 10, this);
            tiles[4][10]  = new Tiles.BrickWall(4, 10, this);
            tiles[5][10]  = new Tiles.BrickWall(5, 10, this);
            tiles[6][10]  = new Tiles.BrickWall(6, 10, this);
            tiles[7][10]  = new Tiles.BrickWall(7, 10, this);
            tiles[8][10]  = new Tiles.BrickWall(8, 10, this);
            tiles[9][10]  = new Tiles.BrickWall(9, 10, this);
            tiles[10][10] = new Tiles.BrickWall(10, 10, this);

            tiles[15][15] = new Tiles.EnemyBarrier(15, 15, this);
            tiles[15][14] = new Tiles.EnemyBarrier(15, 14, this);
            tiles[15][13] = new Tiles.EnemyBarrier(15, 13, this);
            tiles[16][15] = new Tiles.BrickWall(16, 15, this);
            tiles[17][15] = new Tiles.BrickWall(17, 15, this);
            tiles[18][15] = new Tiles.BrickWall(18, 15, this);
            tiles[19][15] = new Tiles.BrickWall(19, 15, this);
            tiles[20][15] = new Tiles.BrickWall(20, 15, this);
            tiles[21][15] = new Tiles.BrickWall(21, 15, this);
            tiles[22][15] = new Tiles.BrickWall(22, 15, this);
            tiles[23][15] = new Tiles.BrickWall(23, 15, this);
            tiles[24][15] = new Tiles.BrickWall(24, 15, this);
            tiles[25][15] = new Tiles.BrickWall(25, 15, this);
            tiles[26][15] = new Tiles.BrickWall(26, 15, this);
            tiles[27][15] = new Tiles.BrickWall(27, 15, this);
            tiles[28][15] = new Tiles.BrickWall(28, 15, this);
            tiles[13][17] = new Tiles.BrickWall(13, 17, this);

            for (int i = 1; i < 10; i++)
            {
                tiles[i][height - 2] = new Tiles.Dirt(i, height - 2, this);
                tiles[i][height - 3] = new Tiles.Grass(i, height - 3, this);
            }
            for (int i = 10; i < width - 1; i++)
            {
                tiles[i][height - 2] = new Tiles.Grass(i, height - 2, this);
            }
            spawnPoint = new Vector2(60, 60);
        }
Ejemplo n.º 14
0
 protected void pRemovePlayer(NPCProto proto)
 {
     NPCList.Remove(proto);
 }
Ejemplo n.º 15
0
    public override IEnumerator Execute()
    {
        NPCList.GetNPC(npc).SetFacingDirection(dir);

        yield return(null);
    }
Ejemplo n.º 16
0
 private void Start()
 {
     instance = this;
 }