public void LoadInteraction(Obstacle obstacle, RaidHallSector sector)
    {
        RaidSceneManager.Inventory.SetObstacleState();

        EventType  = InteractionEventType.Obstacle;
        ActionType = InteractionResultType.Waiting;
        AreaView   = sector;

        interactionSlot.Reset();
        handButton.interactable = true;

        interactionSlot.Item             = DarkestDungeonManager.Data.Items["supply"]["shovel"];
        interactionSlot.itemIcon.sprite  = DarkestDungeonManager.Data.Sprites["inv_supply+shovel"];
        interactionSlot.itemIcon.enabled = true;
        interactionSlot.IsItemAllowed    = false;

        if (RaidSceneManager.Inventory.ContainsItem(interactionSlot.Item))
        {
            interactionSlot.IsItemFixed       = true;
            interactionSlot.itemIcon.material = interactionSlot.itemIcon.defaultMaterial;
        }
        else
        {
            interactionSlot.IsItemFixed       = false;
            interactionSlot.itemIcon.material = DarkestDungeonManager.GrayDarkMaterial;
        }

        title.text       = LocalizationManager.GetString("str_obstacle_" + obstacle.StringId + "_title");
        description.text = LocalizationManager.GetString("str_obstacle_" + obstacle.StringId + "_description");

        ScrollOpened();
    }
Beispiel #2
0
    public void TransferToHallwaySector(RaidHallwayView hallwayView, RaidHallSector raidHallSector)
    {
        RaidSceneManager.DungeonCamera.mode = CameraMode.Follow;
        RaidSceneManager.DungeonCamera.Transform.position = new Vector3(raidHallSector.RectTransform.position.x, -2, -290);

        heroes.RectTransform.SetParent(hallwayView.hallwayPassage.RectTransform, false);
        heroes.RectTransform.position = hallwayView.startingPosition.position;
        Vector3[] corners = new Vector3[4];
        raidHallSector.RectTransform.GetWorldCorners(corners);
        if (raidHallSector.Area.HasActiveBattle)
        {
            heroes.ranks.RectTransform.position = new Vector3(corners[0].x + (corners[3].x - corners[0].x) * 1.05f / 6,
                                                              hallwayView.startingPosition.position.y, hallwayView.startingPosition.position.z);
        }
        else
        {
            heroes.ranks.RectTransform.position = new Vector3(corners[3].x,
                                                              hallwayView.startingPosition.position.y, hallwayView.startingPosition.position.z);
        }

        heroes.ranks.InstantRelocation();
    }
Beispiel #3
0
 public void GetUnitOutOfDoor(RaidHallSector sector, int unitIndex)
 {
     heroes.party.Units[unitIndex].DeleteTarget(0.2f);
 }
Beispiel #4
0
 public void SendUnitIntoDoor(RaidHallSector sector, int unitIndex)
 {
     heroes.party.Units[unitIndex].SetTarget(new Vector3(sector.Prop.RectTransform.position.x,
                                                         heroes.party.Units[unitIndex].RectTransform.position.y + enterDoorYOffset,
                                                         sector.Prop.RectTransform.position.z + enterDoorZOffset), 0.2f);
 }
Beispiel #5
0
 public void LoadInteraction(Obstacle obstacle, RaidHallSector sector)
 {
     itemInteraction.LoadInteraction(obstacle, sector);
 }