public static FloorMechanismObject CreateFloorMechanismObject(FloorMechanismDefinition definition, int x, int y) { //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("CreateFloorMechanismObject called while the factory is not ready.", 322, "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}.", "CreateFloorMechanismObject", x, y), 331, "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; FloorMechanismObject component = s_floorMechanismCharacterPool.Instantiate(position, Quaternion.get_identity(), transform).GetComponent <FloorMechanismObject>(); component.InitializeDefinitionAndArea(definition, x, y); component.SetCellObject(cellObject); return(component); }
public static FloorMechanismStatus Create(int id, [NotNull] FloorMechanismDefinition 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); return(new FloorMechanismStatus(id, id2, teamId, teamIndex, level) { area = area, definition = definition }); }
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 CreateFloorMechanismObject(FightStatus fightStatus, FloorMechanismStatus floorMechanismStatus, PlayerStatus ownerStatus, int x, int y) { FloorMechanismDefinition floorMechanismDefinition = (FloorMechanismDefinition)floorMechanismStatus.definition; if (!(null == floorMechanismDefinition)) { FloorMechanismObject floorMechanismObject = FightObjectFactory.CreateFloorMechanismObject(floorMechanismDefinition, x, y); if (!(null == floorMechanismObject)) { floorMechanismStatus.view = floorMechanismObject; floorMechanismObject.alliedWithLocalPlayer = (GameStatus.localPlayerTeamIndex == floorMechanismStatus.teamIndex); yield return(floorMechanismObject.LoadAnimationDefinitions(floorMechanismDefinition.defaultSkin.value)); floorMechanismObject.Initialize(fightStatus, ownerStatus, floorMechanismStatus); yield return(floorMechanismObject.Spawn()); } } }
private static ITooltipDataProvider Create(FloorMechanismDefinition mechanism, int level) { return(new FloorMechanismTooltipDataProvider(mechanism, level)); }