Unity - A计划(一年有效期) 扫二维码继续学习 二维码时效为半小时

(61评价)
价格: 2165.00元

先判断是不是脚本

再读取脚本

text = File.ReadAllText()会自动关闭流,相对比较方便

再获取类名

 

[展开全文]
sexycow · 2019-12-04 · 0

Editer的脚本一定要放在Editer文件夹中

 

[展开全文]
sexycow · 2019-12-04 · 0

客户端移植通讯会话

[展开全文]
monkiw · 2019-11-28 · 0

教程中关于comboIndex归零的处理太麻烦,而且会丢失一次点击响应,我的代码很简单:

public void ReleaseNormalAtk()
    {
        if(entitySelfPlayer.currentAniState==AniState.Attack)
        {
            //在500ms内进行第二次点击,存数据
            double nowAtkTime = TimerSvc.Instance.GetNowTime();
            if(nowAtkTime-lastAtkTime<Constants.ComboSpace&&lastAtkTime!=0)
            {

                //索引自动归零
                comboIndex =(comboIndex+1)%comboArr.Length;
                entitySelfPlayer.comboQue.Enqueue(comboArr[comboIndex]);
                lastAtkTime = nowAtkTime;
            }
        }
        else if(entitySelfPlayer.currentAniState==AniState.Idle||entitySelfPlayer.currentAniState==AniState.Move)
        {
            lastAtkTime = TimerSvc.Instance.GetNowTime();
            entitySelfPlayer.Attack(comboArr[0]);
        }

        
        PECommon.Log("Click Normal Attack");
    }

[展开全文]
Unity菜民 · 2019-11-25 · 0

动画播放仍然有问题,状态机按照教程设定,粒子系统均不能播放,动画会播放两次。什么原因?目前不清楚。

[展开全文]
Unity菜民 · 2019-11-25 · 0

因为有多种技能,都放在Update里面,代码太多。自己重写了一下更新冷却效果代码,采用倒计时方式,显示剩余百分比,(范围9~0):

private void Update()
    {
        if(Input.GetKeyDown(KeyCode.Alpha1))
        {
            ClickSkill1Atk();
        }

        if (isSk1CD)
        {
            UpdateSk1FillAmount();
        }
    }

 

public Image imgSk1CD;
    public Text txtSk1CD;
    private bool isSk1CD = false;
    private float sk1CDTime;
    private int sk1Num;
    private float sk1FillCount = 0f;
    private float sk1CDTimeCount;//用于保存冷却剩余百分比

    public void ClickSkill1Atk()
    {
        if (isSk1CD == false)
        {
            BattleSys.Instance.ReqReleaseSkill(1);
            isSk1CD = true;
            SetActive(imgSk1CD);
            imgSk1CD.fillAmount = 1;
            //sk1Num = (int)sk1CDTime;
            //SetText(txtSk1CD, sk1Num);
            sk1CDTimeCount = sk1CDTime;
            sk1FillCount = sk1CDTimeCount / sk1CDTime;
            imgSk1CD.fillAmount = sk1FillCount;
            sk1Num = (int)(sk1FillCount * 10);
            SetText(txtSk1CD, sk1Num);
        }
    }

    public void UpdateSk1FillAmount()
    {
        sk1CDTimeCount -= Time.deltaTime;
        if(sk1CDTimeCount>0)
        {
            sk1FillCount = sk1CDTimeCount / sk1CDTime;
            imgSk1CD.fillAmount = sk1FillCount;
            sk1Num = (int)(sk1FillCount*10);
            SetText(txtSk1CD, sk1Num);
        }
        else
        {
            isSk1CD = false;
            SetActive(imgSk1CD, false);
        }
    }

 

[展开全文]
Unity菜民 · 2019-11-25 · 0

这里面的二阶矩阵相乘的公式的结果矩阵的第一个元素加号后面写错了 应该是a12b21

[展开全文]
钦宁_ · 2019-11-23 · 0

暂停界面有研究插件源码进行扩展

[展开全文]
从零开始 · 2019-11-19 · 0

为什么我这边物效只能播放一次呢?PlayerController.cs中设置特效函数:

public override void SetFX(string name,float destroy)
    {
        GameObject go;
        if(fxDic.TryGetValue(name,out go))
        {
            go.SetActive(true);
            timerSvc.AddTimeTask((int tid) =>
            {
                PECommon.Log("FX Played.");
                go.SetActive(false);
            }, destroy);

            PECommon.Log("FX Found in fxDic");
        }
        //else
        //{
        //    PECommon.Log("FX was not Found in fxDic");
        //}
    }

 

其中调试信息都能输出,就是特效只在第一次能播放。

[展开全文]
Unity菜民 · 2019-11-19 · 0

条件

1,Depth

2,MatID

 

[展开全文]
Hanfy · 2019-11-18 · 0

111111111111112312321321323412完全大是按市场是的撒 

[展开全文]
jykxinter · 2019-11-13 · 0

//2.有一个节点(左或者右)
            if (node.LeftChild == null && node.RightChild != null)
            {
                node.Data = node.RightChild.Data;
                node.LeftChild = node.LeftChild.LeftChild;
                node.RightChild = node.RightChild.RightChild;
                node.RightChild = null;
                return;
            }
            if (node.LeftChild != null && node.RightChild == null)
            {
                node.Data = node.LeftChild.Data;
                node.LeftChild = node.LeftChild.LeftChild;
                node.RightChild = node.RightChild.RightChild;
                node.LeftChild = null;
                return;
            }

[展开全文]
_萌新专家 · 2019-11-05 · 0

UI制作视频播放这么快,叫人来不及看,怎么这一块

[展开全文]
Unity菜民 · 2019-10-30 · 0

视口坐标系:是比例的

[展开全文]
zhangyan · 2019-10-29 · 0

OpenGL右手坐标系,Direct3D左手,Unity3D左手。

[展开全文]
zhangyan · 2019-10-29 · 0

服务器端配置信息为什么不存到数据库里面呢?

[展开全文]
Unity菜民 · 2019-10-29 · 0

这里提到了一种懒加载的方法,非常好用。

并且把UI层级做成了PREFABS的形式。

[展开全文]
小米饼 · 2019-10-21 · 0

这部分很重要,展示了通常GUI应该如何载入

还有一个超快速的卸载功能,因为引用了monobevahiourssimplyfy 里面的  Delay

[展开全文]
小米饼 · 2019-10-21 · 0

这个方法和在SIKI上看到的另外一个很不一样,需要对比再决定我要使用哪一个。

[展开全文]
小米饼 · 2019-10-18 · 0

这里讲了关于类是如何合并的,也就是说,一个类里的内容,可以分布在不同的脚本里,但尚未讲到最终如何合并这个类。

[展开全文]
小米饼 · 2019-10-18 · 0