public IMediator getMediator(string mediatorName) { IMediator mediator; if (mediatorMap.TryGetValue(mediatorName, out mediator)) { return(mediator); } return(null); }
public void load(string spriteName) { if (anim != null) { anim.stop(); } string path; if (upkList.TryGetValue(spriteName, out path)) { if (anim == null) { anim = gameObject.AddComponent <ImageAnimation>(); } anim.load(path); anim.play(true); return; } Sprite sprite; if (spriteList.TryGetValue(spriteName, out sprite)) { image.sprite = sprite; return; } image.sprite = Resources.Load <Sprite>(spriteName); }
public IProxy getProxy(string proxyName) { IProxy proxy; if (proxyMap.TryGetValue(proxyName, out proxy)) { return(proxy); } return(null); }
public object getInjectLock(string className) { object value; if (mvcInjectProxyLock.TryGetValue(className, out value)) { return(value); } if (mvcInjectMediatorLock.TryGetValue(className, out value)) { return(value); } return(null); }
public static Texture GetSharedColorTexture(Color color) { Texture result; if (texture2Dictionary.TryGetValue(color, out result) == false || result == null) { Texture2D texture2D = new Texture2D(1, 1); texture2D.SetPixel(1, 1, color); texture2D.Apply(); result = texture2D; texture2Dictionary[color] = result; } return(result); }