From a9888da251d3ce142dc98c6e9ab519ef37007250 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 11 四月 2019 17:00:54 +0800
Subject: [PATCH] 6481 【前端】【2.0】创角修改
---
UI/Common/UI3DModelFactory.cs | 55 -------------------------------------------------------
1 files changed, 0 insertions(+), 55 deletions(-)
diff --git a/UI/Common/UI3DModelFactory.cs b/UI/Common/UI3DModelFactory.cs
index 44ec9d6..66bd059 100644
--- a/UI/Common/UI3DModelFactory.cs
+++ b/UI/Common/UI3DModelFactory.cs
@@ -1,67 +1,12 @@
锘縰sing UnityEngine;
-
using System.Collections.Generic;
using System;
public class UI3DModelFactory
{
-
static UI3DModelFactory()
{
GlobalTimeEvent.Instance.minuteEvent += OnPerMinute;
- }
-
- static Dictionary<int, GameObject> jobModels = new Dictionary<int, GameObject>();
-
- public static void LoadCreateRole(int job, Action<bool, UnityEngine.Object> _callBack)
- {
- if (jobModels.ContainsKey(job))
- {
- if (_callBack != null)
- {
- _callBack(true, jobModels[job]);
- }
-
- return;
- }
-
- Action<bool, UnityEngine.Object> assetCallBack = (bool _ok, UnityEngine.Object _asset) =>
- {
- GameObject instance = null;
- if (_ok)
- {
- instance = GameObject.Instantiate(_asset) as GameObject;
- if (instance != null)
- {
- jobModels[job] = instance;
- }
- }
-
- if (_callBack != null)
- {
- _callBack(_ok && instance != null, instance);
- }
- };
-
- InstanceResourcesLoader.LoadCreateRole(job, assetCallBack);
- }
-
- public static void ReleaseCreateRole(int job)
- {
- if (jobModels.ContainsKey(job))
- {
- jobModels[job].gameObject.SetActive(false);
- }
- }
-
- public static void ClearCreateRole()
- {
- jobModels.Clear();
-
- if (!AssetSource.mobFromEditor)
- {
- AssetBundleUtility.Instance.UnloadAssetBundle("mob/createrole", true, false);
- }
}
public static GameObject LoadUINPC(int id)
--
Gitblit v1.8.0