public CastHighlight CreateCastHighlight <T>(T item, Transform parent) where T : ICastableStatus { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) ICastableDefinition definition = item.GetDefinition(); CastHighlight castHighlight = GetCastHighlight(definition); if (castHighlight == null) { Log.Error(string.Format("No {0} prefab defined for {1}: {2}", "CastHighlight", item.GetType().Name, definition), 297, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\Fight\\Gauges\\FightUIFactory.cs"); return(null); } if (!s_castHighlightPools.TryGetValue(castHighlight, out GameObjectPool value)) { value = new GameObjectPool(castHighlight.get_gameObject()); s_castHighlightPools.Add(castHighlight, value); } CastHighlight component = value.Instantiate(parent, true).GetComponent <CastHighlight>(); if (component != null) { s_castHighlightInstances.Add(new KeyValuePair <CastHighlight, GameObjectPool>(component, value)); component.get_transform().set_localPosition(Vector3.get_zero()); component.Play(); } return(component); }
public GameObject CreateCastFX <T>(T item, Vector3 position, Quaternion rotation) where T : ICastableStatus { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) ICastableDefinition definition = item.GetDefinition(); GameObject castFX = GetCastFX(definition); if (castFX == null) { Log.Error($"No castFX prefab defined for {item.GetType().Name}: {definition}", 376, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\Fight\\Gauges\\FightUIFactory.cs"); return(null); } GameObject val = Object.Instantiate <GameObject>(castFX); if (val != null) { val.get_transform().set_position(position); val.get_transform().set_rotation(rotation); } return(val); }