Ejemplo n.º 1
0
        public void Update()
        {
            if (mrList != null)
            {
                for (int i = 0; i < damageDrawNum; i++)
                {
                    if (mrList[i] != null)
                    {
                        MeshRenderer tempMR = mrList[i];

                        for (int m = 0; m < damageUnitNum; m++)
                        {
                            BattleDamageNumUnit tempUnit = unitVec[i, m];

                            if (tempUnit.State == 1 || tempUnit.IsChange)
                            {
                                if (tempUnit.IsChange)
                                {
                                    tempUnit.IsChange = false;
                                }

                                tempUnit.GetFix(tempMR.material);
                                tempUnit.GetState(tempMR.material);

//	                            tempMR.material.SetVector("fix" + m.ToString(), tempUnit.GetFix());
//                                tempMR.material.SetVector("state" + m.ToString(), tempUnit.GetState());
                            }
                        }

                        for (int n = 0; n < damageGroupNum; n++)
                        {
                            BattleDamageNumGroup tempGroup = groupVec[i, n];

                            if (tempGroup.State == 1 || tempGroup.IsChange)
                            {
                                if (tempGroup.IsChange)
                                {
                                    tempGroup.IsChange = false;
                                }

                                tempGroup.GetPositionsVec(tempMR.material);
                                tempGroup.GetScaleFix(tempMR.material);

//	                            tempMR.material.SetVector("positions" + n.ToString(), tempGroup.GetPositionsVec());
//                                tempMR.material.SetVector("scaleFix" + n.ToString(), tempGroup.GetScaleFix());
                            }
                        }
                    }
                }
            }
        }