public static SummoningCharacterObject CreateSummoningCharacterObject(SummoningDefinition definition, int x, int y, Direction direction) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) if (null == s_instance) { Log.Error("CreateSummoningCharacterObject called while the factory is not ready.", 245, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightObjectFactory.cs"); return(null); } if (!FightMap.current.TryGetCellObject(x, y, out CellObject cellObject)) { Log.Error(string.Format("{0} called with an invalid position {1}, {2}.", "CreateSummoningCharacterObject", x, y), 254, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightObjectFactory.cs"); return(null); } Transform transform = cellObject.get_transform(); Vector3 position = transform.get_position(); position.y += 0.5f; SummoningCharacterObject component = s_summoningCharacterPool.Instantiate(position, Quaternion.get_identity(), transform).GetComponent <SummoningCharacterObject>(); component.InitializeDefinitionAndArea(definition, x, y); component.SetCellObject(cellObject); component.direction = direction; return(component); }
public static void ReleaseSummoningCharacterObject([NotNull] SummoningCharacterObject instance) { if (s_summoningCharacterPool != null) { s_summoningCharacterPool.Release(instance.get_gameObject()); } }
public static IEnumerator CreateSummoningCharacterObject(FightStatus fightStatus, SummoningStatus summoningStatus, PlayerStatus ownerStatus, int x, int y, Direction direction) { SummoningDefinition summoningDefinition = (SummoningDefinition)summoningStatus.definition; if (!(null == summoningDefinition)) { SummoningCharacterObject summoningCharacterObject = FightObjectFactory.CreateSummoningCharacterObject(summoningDefinition, x, y, direction); if (!(null == summoningCharacterObject)) { summoningStatus.view = summoningCharacterObject; yield return(summoningCharacterObject.LoadAnimationDefinitions(summoningDefinition.defaultSkin.value)); summoningCharacterObject.Initialize(fightStatus, ownerStatus, summoningStatus); yield return(summoningCharacterObject.Spawn()); } } }