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 SummoningStatus Create(int id, [NotNull] SummoningDefinition definition, int level, PlayerStatus owner, Vector2Int position) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) int id2 = owner.id; int teamId = owner.teamId; int teamIndex = owner.teamIndex; Area area = definition.areaDefinition.ToArea(position); SummoningStatus obj = new SummoningStatus(id, id2, teamId, teamIndex, level) { area = area, definition = definition }; CharacterStatus.InitializeStatus(obj, definition); return(obj); }
public static ITooltipDataProvider Create <T>(T definition, int level) where T : IDefinitionWithTooltip { SpellDefinition spellDefinition = definition as SpellDefinition; if (spellDefinition != null) { return(Create(spellDefinition, level)); } CompanionDefinition companionDefinition = definition as CompanionDefinition; if (companionDefinition != null) { return(Create(companionDefinition, level)); } SummoningDefinition summoningDefinition = definition as SummoningDefinition; if (summoningDefinition != null) { return(Create(summoningDefinition, level)); } WeaponDefinition weaponDefinition = definition as WeaponDefinition; if (weaponDefinition != null) { return(Create(weaponDefinition, level)); } FloorMechanismDefinition floorMechanismDefinition = definition as FloorMechanismDefinition; if (floorMechanismDefinition != null) { return(Create(floorMechanismDefinition, level)); } ObjectMechanismDefinition objectMechanismDefinition = definition as ObjectMechanismDefinition; if (objectMechanismDefinition != null) { return(Create(objectMechanismDefinition, level)); } ReserveDefinition reserveDefinition = definition as ReserveDefinition; if (reserveDefinition != null) { return(Create(reserveDefinition, level)); } throw new ArgumentOutOfRangeException(); }
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()); } } }
private static ITooltipDataProvider Create(SummoningDefinition summoning, int level) { return(new CharacterTooltipDataProvider <SummoningDefinition>(summoning, level)); }
public static string GetUICharacterResourcesBundleName(SummoningDefinition definition) { return("core/ui/characters/summonings"); }