Exemple #1
0
        public override void Unload()
        {
            CommandLogic.instance = null;
            orgCoatSlots          = new int[0];
            HidePartyUI();
            HideCommandUI();
            HideDialogUI();
            HideLevelUpUI();

            PartySelectHotkey = null;
            GuardHotKey       = null;
            MusicUpKey        = null;
            MusicLeftKey      = null;
            MusicDownKey      = null;
            MusicRightKey     = null;

            if (partyUI != null && commandUI != null && dialogUI != null)
            {
                partyUI.Destroy();
                commandUI.Destroy();
                dialogUI.Destroy();
            }
            partyUI   = null;
            commandUI = null;
            dialogUI  = null;
            instance  = null;
        }
Exemple #2
0
    public void ShowUnit(Unit unit)
    {
        this.gameObject.SetActive(true);

        PartyUI.DrawPortrait(unit, Face);
        //PartyUI.RenderParty()
        //Face.sprite = LazyLoad.GetSpecificSpriteArt(unit.Spec.FaceArt);

        Atk.text      = unit.Stats.Atk.ToString();
        Def.text      = unit.Stats.Def.ToString();
        Matk.text     = unit.Stats.Matk.ToString();
        Mdef.text     = unit.Stats.Mdef.ToString();
        Speed.text    = unit.Stats.Speed.ToString();
        Accuracy.text = unit.Stats.Accuracy.ToString();
        HP.text       = $"{unit.Stats.HP} / {unit.Stats.MaxHP}";
        MP.text       = $"{unit.Stats.Mp} / {unit.Stats.MaxMP}";
    }
Exemple #3
0
 public void Display(ClientDungeon dungeon)
 {
     _dungeon = dungeon;
     Log.Info($"Displaying {dungeon}");
     gameObject.SetActive(true);
     for (var x = 0; x < 4; x++)
     {
         var unitActive = ViewingBattle.Units.Length > x;
         UnitPanel[x].gameObject.SetActive(unitActive);
         if (!unitActive)
         {
             continue;
         }
         var battleUnit = ViewingBattle.Units[x];
         UnitPanel[x].ShowUnit(battleUnit.UnitReference);
     }
     PartyUI.DrawPartyIcon(UIManager.PartyUI.SelectedParty, PartyFace);
 }
Exemple #4
0
        public override void Load()
        {
            PartySelectHotkey = KeybindLoader.RegisterKeybind(this, "Party menu", "F");
            GuardHotKey       = KeybindLoader.RegisterKeybind(this, "Guard", "Q");
            MusicUpKey        = KeybindLoader.RegisterKeybind(this, "MusicalUp", "Z");
            MusicLeftKey      = KeybindLoader.RegisterKeybind(this, "MusicalLeft", "X");
            MusicDownKey      = KeybindLoader.RegisterKeybind(this, "MusicalDown", "N");
            MusicRightKey     = KeybindLoader.RegisterKeybind(this, "MusicalRight", "M");

            instance = this;

            CommandLogic.Initialize();
            CommandLogic.instance.ChangeCommand(0);

            Logger.InfoFormat("{0} Sora logging", Name);

            if (!Main.dedServ)
            {
                orgCoatSlots    = new int[3];
                orgCoatSlots[0] = AddEquipTexture(new Items.Armor.orgCoat(), EquipType.Body, "KingdomTerrahearts/Items/Armor/orgCoat_Body");
                orgCoatSlots[1] = AddEquipTexture(new Items.Armor.orgCoat(), EquipType.Legs, "KingdomTerrahearts/Items/Armor/orgCoat_Legs");
                orgCoatSlots[2] = AddEquipTexture(new Items.Armor.orgCoat(), EquipType.Head, "KingdomTerrahearts/Items/Armor/orgCoat_Head");



                MusicLoader.AddMusicBox(this,
                                        MusicLoader.GetMusicSlot(this, "Sounds/Music/Lazy Afternoons"), ModContent.ItemType <Items.Placeable.LazyAfternoons_Item>(), ModContent.TileType <Tiles.MusicBoxes.LazyAfternoons_MusicBox>());

                MusicLoader.AddMusicBox(this,
                                        MusicLoader.GetMusicSlot(this, "Sounds/Music/Vector to the Heaven"), ModContent.ItemType <Items.Placeable.VectorToHeaven_Item>(), ModContent.TileType <Tiles.MusicBoxes.VectorToHeaven_MusicBox>());
            }

            if (Main.netMode != NetmodeID.Server)
            {
                // First, you load in your shader file.
                // You'll have to do this regardless of what kind of shader it is,
                // and you'll have to do it for every shader file.
                // This example assumes you have both armour and screen shaders.

                Ref <Effect> dyeRef = new Ref <Effect>(ModContent.Request <Effect>("KingdomTerrahearts/Effects/lastWorldShader").Value);

                // To add a dye, simply add this for every dye you want to add.
                // "PassName" should correspond to the name of your pass within the *technique*,
                // so if you get an error here, make sure you've spelled it right across your effect file.

                GameShaders.Armor.BindShader(ModContent.ItemType <Items.lastWorldDye>(), new ArmorShaderData(dyeRef, "ArmorMyShader"));

                Ref <Effect> screenRef = new Ref <Effect>(ModContent.Request <Effect>("KingdomTerrahearts/Effects/Shockwave").Value);              // The path to the compiled shader file.
                Filters.Scene["Shockwave"] = new Filter(new ScreenShaderData(screenRef, "Shockwave"), EffectPriority.VeryHigh);
                Filters.Scene["Shockwave"].Load();
            }

            if (!Main.dedServ)
            {
                partyInterface = new UserInterface();
                partyUI        = new PartyUI();
                partyUI.Activate();

                commandInterface = new UserInterface();
                commandUI        = new CommandMenu();
                commandUI.Activate();

                dialogInterface = new UserInterface();
                dialogUI        = new DialogDisplay();
                dialogUI.Activate();

                levelUpInterface = new UserInterface();
                levelUpUI        = new KeybladeLeveling();
                levelUpUI.Activate();
            }


            //Collision extra

            On.Terraria.Player.Update_NPCCollision += CollisionDetour;
        }