Пример #1
0
    void Awake()
    {
        PlayerColors.PlayerElements _Elements = m_PlayerColors.Elements[m_GameSettings.LocalPlayerIndex];

        m_UI.sprite = _Elements.TownUI;
        m_Flag.sprite = _Elements.TownScreenFlag;

        m_HallScreens[0].sprite = _Elements.TownHallUI1;
        m_HallScreens[1].sprite = _Elements.TownHallUI2;
        m_HallScreens[2].sprite = _Elements.TownHallUI3;
        m_HallScreens[3].sprite = _Elements.TownHallUI3;
        m_HallScreens[4].sprite = _Elements.TownHallUI3;
        m_HallScreens[5].sprite = _Elements.TownHallUI3;
        m_HallScreens[6].sprite = _Elements.TownHallUI3;
        m_HallScreens[7].sprite = _Elements.TownHallUI2;
        m_HallScreens[8].sprite = _Elements.TownHallUI2;

        m_BuildPanel.sprite = _Elements.BuildPanel;

        m_Root.SetActive(false);

        for (int i = 0; i < m_TownBuildings.Length; i++)
        {
            m_TownBuildings[i].gameObject.SetActive(false);
        }
    }
Пример #2
0
    void Awake()
    {
        PlayerColors.PlayerElements _Elements = m_Colors.Elements[m_Settings.LocalPlayerIndex];

        m_Sidebar.sprite           = _Elements.Sidebar;
        m_SidebarSmall.sprite      = _Elements.SidebarSmall;
        m_BorderTopLeft.sprite     = _Elements.BorderTopLeft;
        m_BorderTop.sprite         = _Elements.BorderTop;
        m_BorderRight.sprite       = _Elements.BorderRight;
        m_BorderLeft.sprite        = _Elements.BorderLeft;
        m_BorderBottomLeft.sprite  = _Elements.BorderBottomLeft;
        m_BorderBottomRight.sprite = _Elements.BorderBottomRight;
        m_Resources.sprite         = _Elements.Resources;
        m_BottomBarFill.sprite     = _Elements.BottomBarFill;
        m_Date.sprite = _Elements.Date;
    }
    void Awake()
    {
        PlayerColors.PlayerElements _Elements = m_PlayerColors.Elements[m_GameSettings.LocalPlayerIndex];

        SpriteState _SpriteState = new SpriteState();

        _SpriteState.pressedSprite  = _Elements.KingdomOverviewPressed;
        _SpriteState.disabledSprite = _Elements.KingdomOverviewDisabled;

        m_KingdomOverviewHighRes.image.sprite = _Elements.KingdomOverview;
        m_KingdomOverviewHighRes.spriteState  = _SpriteState;
        m_KingdomOverviewLowRes.image.sprite  = _Elements.KingdomOverview;
        m_KingdomOverviewLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.UndergroundPressed;
        _SpriteState.disabledSprite = _Elements.UndergroundDisabled;

        m_UndergroundHighRes.image.sprite = _Elements.Underground;
        m_UndergroundHighRes.spriteState  = _SpriteState;
        m_UndergroundLowRes.image.sprite  = _Elements.Underground;
        m_UndergroundLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.OverworldPressed;
        _SpriteState.disabledSprite = _Elements.OverworldDisabled;

        m_OverworldHighRes.image.sprite = _Elements.Overworld;
        m_OverworldHighRes.spriteState  = _SpriteState;
        m_OverworldLowRes.image.sprite  = _Elements.Overworld;
        m_OverworldLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite = _Elements.ViewWorldPressed;

        m_ViewWorldHighRes.image.sprite = _Elements.ViewWorld;
        m_ViewWorldHighRes.spriteState  = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite = _Elements.ReplayOpponentTurnPressed;

        m_ReplayOpponentTurnHighRes.image.sprite = _Elements.ReplayOpponentTurn;
        m_ReplayOpponentTurnHighRes.spriteState  = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite = _Elements.ViewPuzzlePressed;

        m_ViewPuzzleHighRes.image.sprite = _Elements.ViewPuzzle;
        m_ViewPuzzleHighRes.spriteState  = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite = _Elements.DigPressed;

        m_DigHighRes.image.sprite = _Elements.Dig;
        m_DigHighRes.spriteState  = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.QuestLogPressed;
        _SpriteState.disabledSprite = _Elements.QuestLogDisabled;

        m_QuestLogHighRes.image.sprite = _Elements.QuestLog;
        m_QuestLogHighRes.spriteState  = _SpriteState;
        m_QuestLogLowRes.image.sprite  = _Elements.QuestLog;
        m_QuestLogLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.SleepHeroPressed;
        _SpriteState.disabledSprite = _Elements.SleepHeroDisabled;

        m_SleepHeroHighRes.image.sprite = _Elements.SleepHero;
        m_SleepHeroHighRes.spriteState  = _SpriteState;
        m_SleepHeroLowRes.image.sprite  = _Elements.SleepHero;
        m_SleepHeroLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.WakeHeroPressed;
        _SpriteState.disabledSprite = _Elements.WakeHeroDisabled;

        m_WakeHeroHighRes.image.sprite = _Elements.WakeHero;
        m_WakeHeroHighRes.spriteState  = _SpriteState;
        m_WakeHeroLowRes.image.sprite  = _Elements.WakeHero;
        m_WakeHeroLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.MoveHeroPressed;
        _SpriteState.disabledSprite = _Elements.MoveHeroDisabled;

        m_MoveHeroHighRes.image.sprite = _Elements.MoveHero;
        m_MoveHeroHighRes.spriteState  = _SpriteState;
        m_MoveHeroLowRes.image.sprite  = _Elements.MoveHero;
        m_MoveHeroLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.SpellbookPressed;
        _SpriteState.disabledSprite = _Elements.SpellbookDisabled;

        m_SpellbookHighRes.image.sprite = _Elements.Spellbook;
        m_SpellbookHighRes.spriteState  = _SpriteState;
        m_SpellbookLowRes.image.sprite  = _Elements.Spellbook;
        m_SpellbookLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.AdventureOptionsPressed;
        _SpriteState.disabledSprite = _Elements.AdventureOptionsDisabled;

        m_ScenarioInfoHighRes.image.sprite    = _Elements.AdventureOptions;
        m_ScenarioInfoHighRes.spriteState     = _SpriteState;
        m_AdventureOptionsLowRes.image.sprite = _Elements.AdventureOptions;
        m_AdventureOptionsLowRes.spriteState  = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.SystemOptionsPressed;
        _SpriteState.disabledSprite = _Elements.SystemOptionsDisabled;

        m_SystemOptionsHighRes.image.sprite = _Elements.SystemOptions;
        m_SystemOptionsHighRes.spriteState  = _SpriteState;
        m_SystemOptionsLowRes.image.sprite  = _Elements.SystemOptions;
        m_SystemOptionsLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.NextHeroPressed;
        _SpriteState.disabledSprite = _Elements.NextHeroDisabled;

        m_NextHeroHighRes.image.sprite = _Elements.NextHero;
        m_NextHeroHighRes.spriteState  = _SpriteState;
        m_NextHeroLowRes.image.sprite  = _Elements.NextHero;
        m_NextHeroLowRes.spriteState   = _SpriteState;

        _SpriteState = new SpriteState();
        _SpriteState.pressedSprite  = _Elements.EndTurnPressed;
        _SpriteState.disabledSprite = _Elements.EndTurnDisabled;

        m_EndTurnHighRes.image.sprite = _Elements.EndTurn;
        m_EndTurnHighRes.spriteState  = _SpriteState;
        m_EndTurnLowRes.image.sprite  = _Elements.EndTurn;
        m_EndTurnLowRes.spriteState   = _SpriteState;

        m_LocalOwnership.OnHeroSelected   += OnHeroSelected;
        m_LocalOwnership.OnHeroDeselected += OnHeroDeselected;
        m_LocalOwnership.OnHeroRemoved    += OnHeroRemoved;

        m_UndergroundHighRes.interactable = m_GameSettings.Scenario.HasUnderground;
        m_UndergroundLowRes.interactable  = m_GameSettings.Scenario.HasUnderground;
    }