Exemplo n.º 1
0
        private async void Start()
        {
            await HUDConfigAsset.Load();

            HUDManager.Init();

            HUDBloodRender render = HUDManager.BloodPool.Alloc() as HUDBloodRender;

            render.SetTransform(Target1);
            render.PushBlood();

            //list.Add
            //m_mesh = new Mesh();
            //combines = new CombineInstance[10];
            //Mesh mesh = new Mesh();
            //var _combineInstance = new CombineInstance();
            //_combineInstance.mesh = mesh;
            //_combineInstance.transform = Matrix4x4.identity;
            //for (int i = 0; i < combines.Length; i++)
            //	combines[i] = _combineInstance;

            //TimelineAsset asset = null;
            //director.playableAsset = asset;
            //IEnumerable<PlayableBinding> bindings = asset.outputs;
            //foreach (var item in bindings)
            //{
            //	SkillTrack skillTrack = item.sourceObject as SkillTrack;
            //	if (skillTrack != null)
            //	{
            //		foreach (var item2 in skillTrack.GetClips())
            //		{
            //			var skillShot = item2.asset as SkillShot;
            //			var explore = new ExposedReference<Transform>();
            //			explore.defaultValue = new GameObject().transform;
            //			skillShot.template.Self = explore;
            //		}
            //	}
            //}
            //director.Play();
            //director.Stop();
        }
Exemplo n.º 2
0
        public static void Init()
        {
            MainCamera  = Camera.main;
            Command     = new CommandBuffer();
            m_HUDConfig = HUDConfigAsset.Get();
            List <HUDNumberAnimation> list = HUDConfigAsset.Get().HUDNumberAnimationAttributesList;

            for (int i = 0; i < list.Count; i++)
            {
                m_HUDNumberAnimationAttributes.Add(list[i].Name, list[i]);
            }
            List <HUDNumberAttributes> list2 = HUDConfigAsset.Get().HUDNumberAttributesList;

            for (int i = 0; i < list2.Count; i++)
            {
                m_HUDNumberAttributes.Add(list2[i].Type, list2[i]);
            }

            m_material = new Material(Shader.Find("UI/UIHUD"));
            m_material.SetInt("unity_GUIZTestMode", (int)CompareFunction.Always);
            MainCamera.AddCommandBuffer(CameraEvent.AfterImageEffects, Command);
            m_mesh = new Mesh();
        }