public void OpenCharViewUI(CharView charView)
    {
        CharViewUI cvu = GetView();

        cvu.character          = charView.character;
        cvu.transform.position = charView.transform.position;
    }
示例#2
0
 internal static void CreateDgClearsBindings(int charIndex, CharView w)
 {
     CreateDgClearsBindingsForTier(charIndex, w.t2panelC.Children);
     CreateDgClearsBindingsForTier(charIndex, w.t3panelC.Children);
     CreateDgClearsBindingsForTier(charIndex, w.t4panelC.Children);
     CreateDgClearsBindingsForTier(charIndex, w.t5panelC.Children);
 }
示例#3
0
 public static void CreateDgBindings(int charIndex, CharView w)
 {
     CreateDgBindingsForTier(charIndex, w.t2panel.Children);
     CreateDgBindingsForTier(charIndex, w.t3panel.Children);
     CreateDgBindingsForTier(charIndex, w.tier4panel.Children);
     CreateDgBindingsForTier(charIndex, w.tier5panel.Children);
     CreateDgBindingsForTier(charIndex, w.soloPanel.Children);
 }
    public void CloseCharViewUI(CharView charView)
    {
        CharViewUI cvu = GetView(charView.character);

        cvu.character = null;
        cvu.transform.localPosition = Vector3.zero;

        cvu.isWorking = false;

        //temp
        cvu.currentMarkAnimator.gameObject.SetActive(false);
    }
示例#5
0
    public void SetSlotPos(CharView view, TeamPos pos, bool isEnemy, bool gameStart = false)
    {
        if (view == null)
        {
            return;
        }

        Transform slotPos = GetPos(pos, isEnemy);
        float     piddle  = isEnemy ? 12 : -12;

        if (gameStart)
        {
            view.transform.position = new Vector3(slotPos.position.x + piddle, slotPos.position.y, slotPos.position.z);
        }
        view.transform.DOMove(slotPos.position, 0.8f);
    }
    public static CharData TestCreat(CharacterDataPack cdp, CharView view = null)
    {
        CharData data = new CharData();

        data.charName  = cdp.heroName;
        data.maxHealth = cdp.maxHealth;
        //data.charShowName = charName;

        SetChar(data, cdp);//Set SKILL
        data.health = cdp.currentHealth == 0 ? data.maxHealth : cdp.currentHealth;
        data.skillControl.SetCurrentCoolDown(cdp.skillCD1, cdp.skillCD2);

        if (view != null)
        {
            data.charView  = view;
            view.character = data;
        }
        return(data);
    }
示例#7
0
        public CharHUDState()
        {
            playerHUD = new HUDContainer();
            view      = new CharView();
            SetupControls();
            var col = new Column()
            {
                playerHUD
            };

            //col.RegisterChild();
            Root.RegisterChild(col);
            // Root.RegisterChild(playerHUD);
            col = new Column()
            {
                view
            };
            Root.RegisterChild(col);
            // Root.RegisterChild(view);
            SetupGUI();
        }
示例#8
0
    public void CharCreate(CharacterDataPack cdp, TeamPos pos, bool isEnemy)
    {
        GameObject go = Instantiate(charViewObject, heroPlace);
        CharView   cv = go.GetComponent <CharView>();

        CharacterCreator.TestCreat(cdp, cv);

        GameObject avatar         = Resources.Load <GameObject>("CharAvatar/" + cdp.heroName);
        GameObject avatarInstance = Instantiate(avatar, cv.transform);

        cv.animator = avatarInstance.GetComponent <Animator>();
        if (isEnemy)
        {
            avatarInstance.transform.localScale = new Vector3(-1, 1, 1);
        }

        SetCharTeamPos(cv.character, pos, isEnemy);
        allChar.Add(cv.character);
        cv.character.charStatusControl.EnterStatus(new nCharStatus.PowerDisplay());
        cv.character.charStatusControl.EnterStatus(new nCharStatus.MagicDisplay());

        slotControl.SetSlotPos(cv, pos, isEnemy, true); //wait
        //charViewUIControl.OpenCharViewUI(cv);
    }