public Script(AssetManager manager, BinaryReader reader, string name) : base(manager, name) { long end = reader.BaseStream.Length; ExceptionEnd = ""; reader.Require(0x01011388); CodeAddressA = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressB = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressC = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressD = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressE = reader.ReadUInt16(); while (reader.BaseStream.Position < end) { try { var instruction = ScriptInstruction.Read(this, reader); InstructionsMutable.Add(instruction); } catch (Exception exception) { ExceptionEnd = string.Format("\r\n{0:X}: Exception: {1}\r\nStopping\r\n", reader.BaseStream.Position, exception); break; } } Link(); }
public static int SaveManagerDetails(AssetManagerRecordDetails details) { using (IDalSession session = NHSessionFactory.CreateSession()) { IAssetManager manager = null; if (details.Key == 0) { manager = new AssetManager(); IEffectenGiro stichting = ManagementCompanyMapper.GetEffectenGiroCompany(session); string tShortName = details.Initials + @" Trading Account"; string tNumber = details.Initials + @"_Trading"; ITradingAccount newTradingAccount = new TradingAccount(tNumber, tShortName, stichting); manager.TradingAccount = newTradingAccount; string nShortName = details.Initials + @" Nostro Account"; string nNumber = details.Initials + @"_Nostro"; INostroAccount newNostroAccount = new NostroAccount(nNumber, nShortName, manager); manager.OwnAccount = newNostroAccount; manager.StichtingDetails = stichting; } else manager = ManagementCompanyMapper.GetAssetManager(session, details.Key); manager.CompanyName = details.Name; manager.Initials = details.Initials; manager.IsActive = details.IsActive; manager.SupportLifecycles = details.SupportLifecycles; session.InsertOrUpdate(manager); return manager.Key; } }
void Awake() { if (object.ReferenceEquals (instance, null)) { instance = this; } else if (!object.ReferenceEquals (instance, this)) { ////////print ("destroyself"); Destroy (gameObject); return; } Debug.Log ("start"); DontDestroyOnLoad (gameObject); #if UNITY_IOS platform = "iOS"; #elif UNITY_ANDROID platform = "Android"; #elif UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN platform = "PC"; #elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX platform = "OSX"; #elif UNITY_WEBPLAYER platform = "Web"; #else platform = "error"; Debug.Log("unsupported platform"); SetDebugText("unsupported platform"); #endif pathToBundles += platform + "/"; bundles = new Dictionary<string, AssetBundle> (); StartCoroutine ("LoadManifest"); }
public WorkoutDataAdapter(AssetManager assets) { _assetManager = assets; var localFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); var localFile = Path.Combine(localFolder, WorkoutFileName); // Check if user file exists. if (!File.Exists (localFile)) { // Check if folder exists. if (!Directory.Exists(localFolder)) { Directory.CreateDirectory(localFolder); } using (var defaultData = _assetManager.Open("Workouts.xml")) { // Save default workouts to folder. using (var fs = new FileStream(localFile, FileMode.CreateNew, FileAccess.Write)) { defaultData.CopyTo (fs); fs.Flush (); fs.Close (); } defaultData.Close (); } } // Now open local file. var dataStream = new FileStream(localFile, FileMode.Open, FileAccess.Read); LoadWorkouts (dataStream); }
public Game1(AssetManager assets) { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; // Allow users to resize the window, and handle the Projection Matrix on Resize //Window.Title = "Disentanglement"; //Window.AllowUserResizing = true; Window.ClientSizeChanged += OnClientSizeChanged; _puzzleState = PuzzleParser.GetGordionCubePuzzle(assets); _initialState = _puzzleState; foreach (var piece in _puzzleState.Pieces) { _pieceVisibility[piece.Piece.Name] = true; } _pieceKeyMapping[Keys.D1] = "Orange"; _pieceKeyMapping[Keys.D2] = "Blue"; _pieceKeyMapping[Keys.D3] = "Yellow"; _pieceKeyMapping[Keys.D4] = "Red"; _pieceKeyMapping[Keys.D5] = "Green"; _pieceKeyMapping[Keys.D6] = "Purple"; System.Threading.ThreadPool.QueueUserWorkItem(delegate { Solve(); }); }
internal TextureArchive(AssetManager manager, BinaryReader reader, string name) : base(manager, name) { ByteOrder = ByteOrder.LittleEndian; reader.RequireMagic(Magic); var totalSize = reader.ReadInt32(); var count = reader.ReadInt32(); ByteOrder = ByteOrder.LittleEndian; int code = reader.ReadInt32(); if (code == 0x20302) { totalSize = totalSize.ReverseBytes(); count = count.ReverseBytes(); ByteOrder = ByteOrder.BigEndian; Platform = DSPlatform.PS3; } else if(code == 0x02030200) { // BigEndianBinaryReader, PS3 Platform = DSPlatform.PS3; } else if (code != 0x20300) throw new InvalidDataException(); for (int index = 0; index < count; index++) new TextureArchiveRecord(this, reader, ByteOrder); Stream = reader.BaseStream; }
internal static List<LocationItem> GetLocationsFromCsvFile(AssetManager assets) { if (LocationItems.Any()) return LocationItems; using (var sr = new StreamReader(assets.Open("TopWorldCities.csv"))) { var x = sr.ReadToEnd(); var position = 0; foreach ( var line in x.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None)) { try { var objectItems = line.Split(';'); if (objectItems.Length != 3) continue; LocationItems.Add(new LocationItem(position, objectItems[0], GetCorrectDoubleValue(objectItems[1]), GetCorrectDoubleValue(objectItems[2]))); position++; } catch (Exception ex) { var tmp = ex.ToString(); } } return LocationItems; } }
/// <summary> /// /// </summary> public TestClient(ClientManager manager) { ClientManager = manager; NewAssetManager = new AssetManager(this); NewAppearanceManager = new AppearanceManager(this, NewAssetManager); updateTimer = new System.Timers.Timer(1000); updateTimer.Elapsed += new System.Timers.ElapsedEventHandler(updateTimer_Elapsed); RegisterAllCommands(Assembly.GetExecutingAssembly()); Settings.DEBUG = true; Settings.STORE_LAND_PATCHES = true; Settings.ALWAYS_REQUEST_OBJECTS = true; Network.RegisterCallback(PacketType.AgentDataUpdate, new NetworkManager.PacketCallback(AgentDataUpdateHandler)); Objects.OnNewPrim += new ObjectManager.NewPrimCallback(Objects_OnNewPrim); Objects.OnObjectUpdated += new ObjectManager.ObjectUpdatedCallback(Objects_OnObjectUpdated); Objects.OnObjectKilled += new ObjectManager.KillObjectCallback(Objects_OnObjectKilled); Objects.OnNewAvatar += new ObjectManager.NewAvatarCallback(Objects_OnNewAvatar); Self.OnInstantMessage += new MainAvatar.InstantMessageCallback(Self_OnInstantMessage); Groups.OnGroupMembers += new GroupManager.GroupMembersCallback(GroupMembersHandler); this.OnLogMessage += new LogCallback(TestClient_OnLogMessage); Network.RegisterCallback(PacketType.AvatarAppearance, new NetworkManager.PacketCallback(AvatarAppearanceHandler)); updateTimer.Start(); }
public MultiOptionSelector(AssetManager assets, string themeName, Vector2 position, Anchor anchor, List<Option> options, MultiOptionArrangement arrangement, Cursor cursor, int initialValue) : base(themeName, position, initialValue) { //process arrangement if (arrangement == MultiOptionArrangement.ListX) arrangement = new MultiOptionArrangement(options.Count, 1); if (arrangement == MultiOptionArrangement.ListY) arrangement = new MultiOptionArrangement(1, options.Count); this.arrangement = arrangement; TextDictionary assetDictionary = new TextDictionary(assets.GetText("selector")); //load themes string cursorTheme = assetDictionary.LookupString(themeName, "cursorTheme"); string optionTheme = assetDictionary.LookupString(themeName, "optionTheme"); Anchor justify = Anchor.Center; bool justifySuccess = assetDictionary.CheckPropertyExists(themeName, "justify"); if (justifySuccess) { string justifyString = assetDictionary.LookupString(themeName, "justify"); if (justifyString == "Left") justify = Anchor.CenterLeft; else if (justifyString == "Right") justify = Anchor.CenterRight; } //position components cursor.Initialize(options, assets, cursorTheme); Vector2 individualSize = Vector2.Zero; for (int i = 0; i < options.Count; i++) { options[i].Initialize(assets, optionTheme); if (options[i].Dimensions.X > individualSize.X) individualSize.X = options[i].Dimensions.X; if (options[i].Dimensions.Y > individualSize.Y) individualSize.Y = options[i].Dimensions.Y; } for (int i = 0; i < options.Count; i++) options[i].Position = (individualSize + cursor.Spacing * Vector2.One) * arrangement.GetPosition(i); Vector2 overallSize = new Vector2(arrangement.Columns * (individualSize.X + cursor.Spacing) - cursor.Spacing, arrangement.Rows * (individualSize.Y + cursor.Spacing) - cursor.Spacing); for (int i = 0; i < options.Count; i++) { Vector2 p = options[i].Position; if (justify == Anchor.TopCenter || justify == Anchor.Center || justify == Anchor.BottomCenter) p.X += (individualSize.X - options[i].Dimensions.X) / 2; else if (justify == Anchor.TopRight || justify == Anchor.CenterRight || justify == Anchor.BottomRight) p.X += individualSize.X - options[i].Dimensions.X; if (justify == Anchor.CenterLeft || justify == Anchor.Center || justify == Anchor.CenterRight) p.Y += (individualSize.Y - options[i].Dimensions.Y) / 2; else if (justify == Anchor.BottomLeft || justify == Anchor.BottomCenter || justify == Anchor.BottomRight) p.Y += individualSize.Y - options[i].Dimensions.Y; options[i].Position = p; } this.Position -= GraphicsHelper.ComputeAnchorOrigin(anchor, overallSize / GraphicsConstants.VIEWPORT_DIMENSIONS); this.options = options; this.cursor = cursor; //initialize position Vector2 initialPosition = arrangement.GetPosition(IntValue); x = (int)initialPosition.X; y = (int)initialPosition.Y; cursor.Update(IntValue); }
public AndroidGraphics(AssetManager am, Bitmap bm) { this.assets = am; this.frameBuffer = bm; this.canvas = new Canvas (frameBuffer); this.paint = new Paint (); }
internal PluginAsset(AssetManager manager, ResourceManager resourceManager) : base(manager, resourceManager) { if (!(this is AssetPlugin)) throw new InvalidOperationException(); Plugin = (AssetPlugin)this; }
public AssetStreamReceiver(AssetManager assets, ByteArrayPool byteArrayPool, string fileName) { this.assets = assets; this.byteArrayPool = byteArrayPool; this.fileName = fileName; metadataBuffer = new byte[4]; }
public AppearanceManager(SecondLife client) { Client = client; AManager = client.Assets; RegisterCallbacks(); }
public long AddAsset(string title, string filename, long folderId, int languageId, long externalTypeid, byte[] filestream, ContentMetaData[] potentialMeta) { try { assetManager = new AssetManager(); assetManager.ContentLanguage = languageId; if (string.IsNullOrEmpty(userauthHeader.AuthenticationToken)) throw new SoapException("User not logged in", SoapException.ClientFaultCode); this.ImpersonateUser(userauthHeader.AuthenticationToken, assetManager.RequestInformation); ContentAssetData contentassetdata = new ContentAssetData() { FolderId = folderId, Title = title, File = filestream, LanguageId = languageId, ExternalTypeId = externalTypeid, AssetData = new AssetData { FileName = filename }, MetaData = potentialMeta }; return assetManager.Add(contentassetdata).Id; } catch (Exception ex) { throw new SoapException("Error adding an asset:" + ex.Message, SoapException.ClientFaultCode); } }
protected override bool IntegrateChild(AssetManager assets, LayoutTreeNode childNode) { switch (childNode.Key) { case "Path": #if DEBUG if (Convert.ToInt32(childNode.KeyExtension) != Path.Count) Console.WriteLine("LevelBuilder WARNING: Ribbon path points are not in order."); #endif Path.Add(ExtendedConvert.ToVector2(childNode.Value)); return true; case "Start": Start = Convert.ToSingle(childNode.Value); return true; case "End": End = Convert.ToSingle(childNode.Value); return true; case "Loop": Loop = Convert.ToBoolean(childNode.Value); return true; case "Complete": Complete = Convert.ToBoolean(childNode.Value); return true; } return false; }
public void TestAsyncLoad( ) { AssetManager assets = new AssetManager( ); assets.AddLoader( new XmlAssetLoader( 10 ) ); using ( AsyncAssetLoader loader = new AsyncAssetLoader( ) ) { int success = 0; int numLoads = 8; AsyncLoadResult[] results = new AsyncLoadResult[ numLoads ]; for ( int loadCount = 0; loadCount < numLoads; ++loadCount ) { AsyncLoadResult result = loader.QueueLoad( assets, new StreamSource( XmlContent, "test.xml" ), null, LoadPriority.High ); result.AddLoadCompleteCallback( delegate( object asset ) { CheckDocument( ( XmlNode )asset ); ++success; }, false ); results[ loadCount ] = result; } for ( int loadCount = 0; loadCount < numLoads; ++loadCount ) { results[ loadCount ].WaitUntilComplete( new TimeSpan( 0, 0, 2 ) ); } Assert.AreEqual( success, numLoads ); } }
public void Load(Sf2Region region, AssetManager assets) { ExclusiveGroup = region.Generators[(int)GeneratorEnum.ExclusiveClass]; ExclusiveGroupTarget = ExclusiveGroup; iniFilterFc = region.Generators[(int)GeneratorEnum.InitialFilterCutoffFrequency]; filterQ = SynthHelper.DBtoLinear(region.Generators[(int)GeneratorEnum.InitialFilterQ] / 10.0); initialAttn = -region.Generators[(int)GeneratorEnum.InitialAttenuation] / 10f; keyOverride = region.Generators[(int)GeneratorEnum.KeyNumber]; velOverride = region.Generators[(int)GeneratorEnum.Velocity]; keynumToModEnvHold = region.Generators[(int)GeneratorEnum.KeyNumberToModulationEnvelopeHold]; keynumToModEnvDecay = region.Generators[(int)GeneratorEnum.KeyNumberToModulationEnvelopeDecay]; keynumToVolEnvHold = region.Generators[(int)GeneratorEnum.KeyNumberToVolumeEnvelopeHold]; keynumToVolEnvDecay = region.Generators[(int)GeneratorEnum.KeyNumberToVolumeEnvelopeDecay]; pan = new PanComponent(); pan.SetValue(region.Generators[(int)GeneratorEnum.Pan] / 500f, PanFormulaEnum.Neg3dBCenter); modLfoToPitch = region.Generators[(int)GeneratorEnum.ModulationLFOToPitch]; vibLfoToPitch = region.Generators[(int)GeneratorEnum.VibratoLFOToPitch]; modEnvToPitch = region.Generators[(int)GeneratorEnum.ModulationEnvelopeToPitch]; modLfoToFilterFc = region.Generators[(int)GeneratorEnum.ModulationLFOToFilterCutoffFrequency]; modEnvToFilterFc = region.Generators[(int)GeneratorEnum.ModulationEnvelopeToFilterCutoffFrequency]; modLfoToVolume = region.Generators[(int)GeneratorEnum.ModulationLFOToVolume] / 10f; LoadGen(region, assets); LoadEnvelopes(region); LoadLfos(region); LoadFilter(region); }
internal StringArchive(AssetManager manager, BinaryReader reader, string name, long length) : base(manager, name) { ByteOrder = ByteOrder.LittleEndian; Encoding = Encoding.Unicode; if (reader is BigEndianBinaryReader) Encoding = Encoding.BigEndianUnicode; using (reader) { reader.Require(Magic1); int totalFileLength = reader.ReadInt32(); if (totalFileLength != length) { if (totalFileLength.ReverseBytes() == length) { ByteOrder = ByteOrder.BigEndian; Encoding = Encoding.BigEndianUnicode; } else throw new InvalidDataException(); } int magic2 = reader.ReadInt32(); if (magic2 != Magic2 && magic2 != Magic2BE) throw new InvalidDataException(); int groupCount = reader.ReadInt32(ByteOrder); int stringCount = reader.ReadInt32(ByteOrder); int stringOffset = reader.ReadInt32(ByteOrder); reader.RequireZeroes(4 * 1); for (int index = 0; index < groupCount; index++) groups.Add(new StringGroup(reader, ByteOrder)); int[] stringOffsets = reader.ReadArrayInt32(stringCount, ByteOrder); for (int index = 0; index < stringCount; index++) { int offset = stringOffsets[index]; if (offset == 0) strings.Add(null); else { reader.BaseStream.Position = offset; string value = reader.ReadStringz(Encoding); strings.Add(value); } } foreach (StringGroup group in groups) { for (int index = 0; index < group.StringCount; index++) { int stringIndex = group.StringsIndex + index; string stringValue = strings[stringIndex]; int realIndex = group.IndexStart + index; if (stringValue != null) stringsById[realIndex] = stringValue; } } } }
public override void Initialize(AssetManager assets, string themeName) { TextDictionary assetDictionary = new TextDictionary(assets.GetText("option")); fontFace = assets.GetFont(assetDictionary.LookupString(themeName, "fontFace")); try { fontColor = new Color(assetDictionary.LookupVector4(themeName, "fontColor")); } catch { fontColor = new Color(assetDictionary.LookupVector3(themeName, "fontColor")); } dimensions = fontFace.MeasureString(text) + new Vector2(0, -5); }
/// <summary> /// /// </summary> /// <param name="client"></param> public AppearanceManager(SecondLife client) { Client = client; Client.Network.RegisterCallback(libsecondlife.Packets.PacketType.AgentWearablesUpdate, new NetworkManager.PacketCallback(AgentWearablesUpdateCallbackHandler)); AManager = client.Assets; AManager.TransferRequestCompletedEvent += new AssetManager.On_TransferRequestCompleted(AManager_TransferRequestCompletedEvent); }
public Framework(IntPtr handle, int width, int height, string mediaRootPath) { Device = new Device(handle, width, height); AssetManager = new AssetManager(Device, mediaRootPath); Light = new Light(); SpriteRenderer = new SpriteRenderer(Device); Renderer = new RenderSystem(Device, SpriteRenderer); }
public static PuzzleState GetGordionCubePuzzle(AssetManager asset) { using (var sr = new StreamReader(asset.Open ("GordionCube.txt"))) { string text = sr.ReadToEnd(); return ReadPuzzle(text); } }
public AndroidGraphics(AssetManager assets, string assetsPrefix, Bitmap frameBuffer) { this.assets = assets; this.assetsPrefix = assetsPrefix; this.frameBuffer = frameBuffer; this.canvas = new Canvas(frameBuffer); this.paint = new Paint(); }
/// <summary>Initialise the asset.</summary> /// <param name="manager"></param> /// <param name="name"></param> /// <param name="data"></param> /// <param name="start"></param> /// <param name="count"></param> /// <param name="displayOffset"></param> public BinaryAsset(AssetManager manager, string name, IList<byte> data, int start, int count, int displayOffset = 0) : base(manager, name) { this.data = data; this.start = start; this.count = count; this.displayOffset = displayOffset; }
public WebAssetManager(AssetManager assetManager) { if (assetManager == null) throw new ArgumentNullException("assetManager"); this.assetManager = assetManager; Timeout = DefaultTimeout; }
internal Palette(AssetManager manager, AssetLoader loader) : base(manager, loader.Name) { using (var reader = loader.Reader) { while (!loader.AtEnd) ColorsMutable.Add(Color.FromArgb(reader.ReadByte(), reader.ReadByte(), reader.ReadByte())); } }
public static void ApplyTypeface(AssetManager assetManager, List<TextView> textViews) { var tf = Typeface.CreateFromAsset (assetManager, PATH_TO_FONT); foreach (var textview in textViews) { textview.Typeface = tf; } }
public SceneManager(Device device, AssetManager assetManager) { this.device = device; this.assetManager = assetManager; // Create default camera and light. Camera = new Camera(); Light = new Light(); }
public static void Init() { GameObject go = GameObject.Find (NAME); if (go == null) { go = new GameObject (NAME); GameObject.DontDestroyOnLoad (go); instance = go.AddComponent<AssetManager> (); } }
public static Style Create(StyleInfo styleInfo, AssetManager assetManager) { if (styleInfo.StyleType == StyleType.Point) { return CreatePointStyle((PointStyleInfo) styleInfo, assetManager); } throw new NotImplementedException(); }
public IActionResult Index() { var assets = AssetManager.GetAll(); return(View(assets)); }
protected override AnimationClip LoadAnimation(ICommandContext commandContext, AssetManager assetManager) { var meshConverter = this.CreateMeshConverter(commandContext, assetManager); var sceneData = meshConverter.ConvertAnimation(SourcePath, Location); return(sceneData); }
public static void HandleClientLobbyRequest(LobbySession session, ClientLobbyRequest sessionRequest) { session.Sequence = sessionRequest.Sequence; string[] versionExplode = sessionRequest.Version.Split('+'); // module data, version... if (versionExplode.Length < 1) { return; } foreach (string moduleVersion in versionExplode[0].Split(',')) { string[] moduleExplode = moduleVersion.Split('/'); if (moduleExplode.Length != 3) { continue; } #if DEBUG Console.WriteLine($"Module - File: {moduleExplode[0]}, Version: {moduleExplode[1]}, Digest: {moduleExplode[2]}"); #endif if (!AssetManager.IsValidVersion(moduleExplode[0], moduleExplode[1], moduleExplode[2])) { session.SendError(1012, 13101); return; } } session.AuthToken = new Token(sessionRequest.Token); #if DEBUG Console.WriteLine($"Token: {sessionRequest.Token}"); #endif session.NewEvent(new DatabaseGenericEvent <uint>(DatabaseManager.Authentication.GetAccount(session.AuthToken.SessionId), accountId => { if (accountId == 0u) { session.SendError(1000, 13100); return; } session.NewEvent(new DatabaseGenericEvent <List <ServiceAccountInfo> >(DatabaseManager.Authentication.GetServiceAccounts(accountId), serviceAccounts => { if (serviceAccounts.Count == 0) { // TODO: probably not the correct error to display when no service accounts are present session.SendError(1000, 13209); return; } session.ServiceAccounts = serviceAccounts; session.Send(new ServerServiceAccountList { Sequence = session.Sequence, ServiceAccounts = session.ServiceAccounts }); })); })); }
private Paradox.Importer.FBX.MeshConverter CreateMeshConverter(ICommandContext commandContext, AssetManager assetManager) { return(new Paradox.Importer.FBX.MeshConverter(commandContext.Logger) { InverseNormals = this.InverseNormals, TextureTagSymbol = this.TextureTagSymbol, ViewDirectionForTransparentZSort = this.ViewDirectionForTransparentZSort, AllowUnsignedBlendIndices = this.AllowUnsignedBlendIndices }); }
// Token: 0x06000ABA RID: 2746 RVA: 0x000E6004 File Offset: 0x000E4204 public LineNode createLine(MapLine mapLine, Vector3 from, Vector3 to, ELineColor color, EUnitSide unitSide, bool bEase = true, bool NeedRenderLine = true, EMonsterFace MonsterFace = EMonsterFace.LEFT, byte bLoop = 0) { CHAOS chaos = GameManager.ActiveGameplay as CHAOS; if (chaos == null || chaos.realmController == null || chaos.realmController.mapLineController == null) { return(null); } if (chaos.realmController.mapLineController.m_Bundle == null) { chaos.realmController.mapLineController.m_Bundle = AssetManager.GetAssetBundle("Role/FlowLinePrefab", 0L); } uint num = mapLine.during; long begin = (long)mapLine.begin; if (num <= 0u) { return(null); } int num2 = (int)(begin + (long)((ulong)num) - DataManager.Instance.ServerTime); if (num2 <= 0) { return(null); } byte side = (byte)unitSide; from = this.m_Parent.transform.InverseTransformPoint(from); from.z = 0f; to = this.m_Parent.transform.InverseTransformPoint(to); to.z = 0f; long num3 = DataManager.Instance.ServerTime - begin; num3 = Math.Max(num3, 0L); num3 = Math.Min(num3, (long)((ulong)num)); float num4 = (float)num3; float num5 = Vector3.Distance(from, to); float num6 = num5 / num * 2f; EMarchEventType emarchEventType = EMarchEventType.EMET_Camp; byte b = mapLine.lineFlag; if (b >= 23) { if (num4 >= 5f) { emarchEventType = (EMarchEventType)b; b = (byte)this.RetreatToReturn((EMarchEventType)b); } else if (b == 24 || b == 25) { side = ((color != ELineColor.DEEPBLUE) ? 0 : 1); } } LineNode lineNode = null; GameObject gameObject; if (this.workingLine != null) { gameObject = this.workingLine.gameObject; gameObject.SetActive(true); this.setupLineNode(lineNode, num5, bEase, (byte)color); } else { if (this.m_Bundle == null) { this.m_Bundle = chaos.realmController.mapLineController.m_Bundle; } gameObject = (UnityEngine.Object.Instantiate(this.m_Bundle.mainAsset) as GameObject); gameObject.transform.parent = this.m_Parent.transform; MeshFilter component = gameObject.GetComponent <MeshFilter>(); Mesh mesh = new Mesh(); MeshRenderer component2 = gameObject.GetComponent <MeshRenderer>(); component2.material.renderQueue = 3001; component.mesh = mesh; lineNode = new LineNode(); lineNode.gameObject = gameObject; lineNode.lineTransform = gameObject.transform; GameObject gameObject2 = new GameObject("movingNode"); gameObject2.transform.parent = gameObject.transform; gameObject2.transform.Rotate(0f, 90f, 0f); lineNode.movingNode = gameObject2.transform; lineNode.meshFilter = component; lineNode.renderer = component2; this.setupLineNode(lineNode, num5, bEase, (byte)color); this.workingLine = lineNode; } float num7 = num4; if (b >= 23 || emarchEventType >= EMarchEventType.EMET_AttackRetreat) { num -= 5u; num7 -= 5f; num7 = ((num7 >= 0f) ? num7 : 0f); } lineNode.lineTableID = (int)mapLine.lineID; lineNode.timeOffset = num7; lineNode.inverseMaxTime = ((num <= 0u) ? 0f : (1f / num)); float x = num5 * (lineNode.timeOffset * lineNode.inverseMaxTime) - num5 * 0.5f; lineNode.movingNode.localPosition = new Vector3(x, 0f, 0f); lineNode.speedRate = num6 / 1.75f; lineNode.unitSpeedRate = 1f; lineNode.bFocus = bLoop; Vector3 from2 = to - from; float num8 = Vector3.Angle(from2, Vector3.right); if (from2.y < 0f) { num8 = 360f - num8; } gameObject.transform.rotation = Quaternion.identity; gameObject.transform.localPosition = from + (to - from) * 0.5f; gameObject.transform.rotation = Quaternion.AngleAxis(num8, Vector3.forward); gameObject.transform.localScale = Vector3.one; this.recalculateSpeed(lineNode, mapLine, true); if (lineNode != null && lineNode.movingNode != null) { if (lineNode.sheetUnit == null) { lineNode.sheetUnit = new SheetAnimationUnitGroupNewbie(); } SheetAnimationUnitGroupNewbie sheetAnimationUnitGroupNewbie = lineNode.sheetUnit as SheetAnimationUnitGroupNewbie; sheetAnimationUnitGroupNewbie.transform.parent = null; sheetAnimationUnitGroupNewbie.transform.rotation = Quaternion.identity; sheetAnimationUnitGroupNewbie.transform.parent = lineNode.movingNode; sheetAnimationUnitGroupNewbie.transform.localPosition = Vector3.zero; byte b2 = 0; if (b == 27 && MonsterFace == EMonsterFace.RIGHT) { b2 |= 1; } sheetAnimationUnitGroupNewbie.setupAnimUnit(side, b, num8, b2); sheetAnimationUnitGroupNewbie.resetScale(); lineNode.flag = b; lineNode.angle = num8; lineNode.side = side; lineNode.MonsterFace = MonsterFace; if (b >= 23) { float timer = 5f - num4; lineNode.renderer.enabled = false; lineNode.action = ELineAction.ACTION_BEFORE; lineNode.timer = timer; } } if (lineNode != null && !NeedRenderLine) { if (lineNode.action == ELineAction.ACTION_BEFORE) { lineNode.action = ELineAction.ACTION_BEFORE_WITHOUT_LINE; } lineNode.renderer.enabled = false; } return(lineNode); }
public static FileManagerDroid LoadConfig(AssetManager assetManager) { throw new NotImplementedException(); }
[Test, Ignore] // ignore the test as long as EntityAsset is not created during import anymore public void TestImportModelSimple() { var file = Path.Combine(Environment.CurrentDirectory, @"scenes\goblin.fbx"); // Create a project with an asset reference a raw file var project = new Package { FullPath = Path.Combine(Environment.CurrentDirectory, "ModelAssets", "ModelAssets" + Package.PackageFileExtension) }; using (var session = new PackageSession(project)) { var importSession = new AssetImportSession(session); // ------------------------------------------------------------------ // Step 1: Add files to session // ------------------------------------------------------------------ importSession.AddFile(file, project, UDirectory.Empty); // ------------------------------------------------------------------ // Step 2: Stage assets // ------------------------------------------------------------------ var stageResult = importSession.Stage(); Assert.IsTrue(stageResult); Assert.AreEqual(0, project.Assets.Count); // ------------------------------------------------------------------ // Step 3: Import asset directly // ------------------------------------------------------------------ importSession.Import(); Assert.AreEqual(4, project.Assets.Count); var assetItem = project.Assets.FirstOrDefault(item => item.Asset is EntityAsset); Assert.NotNull(assetItem); EntityAnalysis.UpdateEntityReferences(((EntityAsset)assetItem.Asset).Hierarchy); var assetCollection = new AssetItemCollection(); // Remove directory from the location assetCollection.Add(assetItem); Console.WriteLine(assetCollection.ToText()); //session.Save(); // Create and mount database file system var objDatabase = new ObjectDatabase("/data/db", "index", "/local/db"); var databaseFileProvider = new DatabaseFileProvider(objDatabase); AssetManager.GetFileProvider = () => databaseFileProvider; ((EntityAsset)assetItem.Asset).Hierarchy.Entities[0].Entity.Components.RemoveWhere(x => x.Key != TransformComponent.Key); //((EntityAsset)assetItem.Asset).Data.Entities[1].Components.RemoveWhere(x => x.Key != SiliconStudio.Paradox.Engine.TransformComponent.Key); var assetManager = new AssetManager(); assetManager.Save("Entity1", ((EntityAsset)assetItem.Asset).Hierarchy); assetManager = new AssetManager(); var entity = assetManager.Load <Entity>("Entity1"); var entity2 = entity.Clone(); var entityAsset = (EntityAsset)assetItem.Asset; entityAsset.Hierarchy.Entities[0].Entity.Components.Add(TransformComponent.Key, new TransformComponent()); var entityAsset2 = (EntityAsset)AssetCloner.Clone(entityAsset); entityAsset2.Hierarchy.Entities[0].Entity.Components.Get(TransformComponent.Key).Position = new Vector3(10.0f, 0.0f, 0.0f); AssetMerge.Merge(entityAsset, entityAsset2, null, AssetMergePolicies.MergePolicyAsset2AsNewBaseOfAsset1); } }
public static int[] CalcExcitesForDrop(GachaDropData a_drop) { int rare = 0; if (a_drop != null) { rare = a_drop.Rare; } return(GachaExciteMaster.SelectStone(JSONParser.parseJSONArray <Json_GachaExcite>(AssetManager.LoadTextData("Data/gacha/stone_animation_pattern")), rare)); }
public static int[] CalcExcites(List <GachaDropData> a_drops) { int num = 1; using (List <GachaDropData> .Enumerator enumerator = a_drops.GetEnumerator()) { while (enumerator.MoveNext()) { GachaDropData current = enumerator.Current; if (current != null) { num = Math.Max(num, current.Rare); } } } return(GachaExciteMaster.Select(JSONParser.parseJSONArray <Json_GachaExcite>(AssetManager.LoadTextData("Data/gacha/animation_pattern")), num)); }
public PreFightView(MainController mainController, Image image, AssetManager assetManager, SoundManager soundManager) : base(mainController, image, assetManager, soundManager) { scale = 1; }
public void AssetManager_Initialize() { AssetManager.Initialize(); }
/// <summary> /// 传入的名字必须是图集的名字,由内部来推导资源的名字 /// </summary> /// <param name="rmgr">Rmgr.</param> /// <param name="name">Name.</param> public UGUIAtlasAsset(AssetManager rmgr, string name) : base(rmgr, "uit_" + name.ToLower() + IOTools.abSuffix) { }
private async void btnStart_Click(object sender, RoutedEventArgs e) { //TODO 分离launcher方法 if (GridConfig.txtUserName.Text == "!!!") { MessageBox.Show(this, "请先修改用户名"); TabMain.SelectedIndex = 1; GridConfig.txtUserName.Focus(); return; } GridConfig.SaveConfig(); var somethingBad = false; try { _isLaunching = true; var selectedVersion = GridGame.GetSelectedVersion(); Logger.Info($"正在启动{selectedVersion},使用的登陆方式为{GridConfig.listAuth.SelectedItem}"); _frmPrs = new FrmPrs(LangManager.GetLangFromResource(selectedVersion)); _frmPrs.Show(); _frmPrs.ChangeStatus(LangManager.GetLangFromResource("LauncherAuth")); var launcher = await BmclCore.GameManager.LaunchGame(selectedVersion, false); if (launcher == null) { _frmPrs.Close(); _frmPrs = null; return; } launcher.OnGameLaunch += Launcher_OnGameLaunch; launcher.OnGameStart += Game_GameStartUp; launcher.OnGameExit += launcher_gameexit; var assetManager = new AssetManager(launcher.VersionInfo); assetManager.OnAssetsDownload += (total, cur, name) => _frmPrs.ChangeStatus($"Assets {cur}/{total}"); await assetManager.Sync(); await launcher.Start(); } catch (NoSelectGameException exception) { Logger.Fatal(exception); somethingBad = true; MessageBox.Show(this, exception.Message, Title, MessageBoxButton.OK, MessageBoxImage.Error); } catch (NoJavaException exception) { Logger.Fatal(exception); somethingBad = true; MessageBox.Show(this, exception.Message, Title, MessageBoxButton.OK, MessageBoxImage.Error); } catch (AnotherGameRunningException exception) { Logger.Fatal(exception); somethingBad = true; MessageBox.Show(this, exception.Message, Title, MessageBoxButton.OK, MessageBoxImage.Error); } catch (DownloadLibException exception) { Logger.Fatal(exception); somethingBad = true; MessageBox.Show(this, exception.Message, Title, MessageBoxButton.OK, MessageBoxImage.Error); } finally { _isLaunching = false; if (somethingBad) { _frmPrs?.Close(); _frmPrs = null; } } }
public void Load(AssetManager am) { am.Load("Config/property", OnLoad); }
// Token: 0x0600189E RID: 6302 RVA: 0x00295074 File Offset: 0x00293274 public override void OnOpen(int arg1, int arg2) { this.DM = DataManager.Instance; this.GM = GUIManager.Instance; this.m_transform = base.transform; this.tmpFont = this.GM.GetTTFFont(); UIText component = this.m_transform.GetChild(5).GetComponent <UIText>(); component.font = this.tmpFont; component.text = this.DM.mStringTable.GetStringByID(12027u); this.AllText.Add(component); this.DontHaveText = this.m_transform.GetChild(6).GetComponent <UIText>(); this.DontHaveText.font = this.tmpFont; this.DontHaveText.text = this.DM.mStringTable.GetStringByID(12030u); this.AllText.Add(this.DontHaveText); this.m_transform.GetChild(7).GetComponent <UIButton>().m_Handler = this; this.m_transform.GetChild(7).gameObject.AddComponent <ArabicItemTextureRot>(); this.m_transform.GetChild(8).GetChild(0).GetComponent <UIButton>().m_Handler = this; this.m_transform.GetChild(8).GetComponent <CustomImage>().hander = this; this.m_transform.GetChild(8).GetChild(0).GetComponent <CustomImage>().hander = this; if (this.GM.bOpenOnIPhoneX) { this.m_transform.GetChild(8).GetComponent <CustomImage>().enabled = false; } this.tFront1 = this.m_transform.GetChild(9); for (int i = 0; i < 3; i++) { this.Box[i].PressImage = this.tFront1.GetChild(i).GetComponent <Image>(); this.Box[i].PressImageSA = this.tFront1.GetChild(i).GetComponent <UISpritesArray>(); this.Box[i].ClockImage = this.tFront1.GetChild(i + 3).GetComponent <Image>(); this.Box[i].Clock2Image = this.tFront1.GetChild(i + 6).GetComponent <Image>(); this.Box[i].BtnTopText = this.tFront1.GetChild(i + 9).GetComponent <UIText>(); this.Box[i].BtnTopText.font = this.tmpFont; this.AllText.Add(this.Box[i].BtnTopText); this.Box[i].TotalTimeText = this.tFront1.GetChild(i + 12).GetComponent <UIText>(); this.Box[i].TotalTimeText.font = this.tmpFont; this.AllText.Add(this.Box[i].TotalTimeText); this.Box[i].OpenTimeText = this.tFront1.GetChild(i + 15).GetComponent <UIText>(); this.Box[i].OpenTimeText.font = this.tmpFont; this.AllText.Add(this.Box[i].OpenTimeText); this.Box[i].TimeStr = StringManager.Instance.SpawnString(15); } this.tFront1.GetChild(18).GetComponent <UIButton>().m_Handler = this; this.tFront1.GetChild(19).GetComponent <UIButton>().m_Handler = this; this.tFront1.GetChild(20).GetComponent <UIButton>().m_Handler = this; this.tFront1.GetChild(21).GetComponent <UIButton>().m_Handler = this; this.tFront1.GetChild(22).GetComponent <UIButton>().m_Handler = this; this.tFront1.GetChild(23).GetComponent <UIButton>().m_Handler = this; for (int j = 0; j < 3; j++) { this.Box[j].HintButton = this.tFront1.GetChild(24 + j).GetComponent <UIButton>(); this.Box[j].HintButton.m_Handler = this; UIButtonHint uibuttonHint = this.Box[j].HintButton.gameObject.AddComponent <UIButtonHint>(); uibuttonHint.m_eHint = EUIButtonHint.DownUpHandler; uibuttonHint.Parm1 = 12026; uibuttonHint.m_DownUpHandler = this; } this.tFront2 = this.m_transform.GetChild(10); HelperUIButton helperUIButton = this.tFront2.gameObject.AddComponent <HelperUIButton>(); helperUIButton.m_Handler = this; helperUIButton.m_BtnID1 = 2; helperUIButton.m_BtnID2 = 1; this.Front_TitleText = this.tFront2.GetChild(4).GetComponent <UIText>(); this.Front_TitleText.font = this.tmpFont; this.AllText.Add(this.Front_TitleText); this.Front_CheckText = this.tFront2.GetChild(8).GetChild(0).GetComponent <UIText>(); this.Front_CheckText.font = this.tmpFont; this.AllText.Add(component); this.Front_TotalTimeText = this.tFront2.GetChild(10).GetComponent <UIText>(); this.Front_TotalTimeText.font = this.tmpFont; this.Front_TotalTimeText.alignment = TextAnchor.MiddleCenter; this.AllText.Add(this.Front_TotalTimeText); this.Front_OpenTimeText = this.tFront2.GetChild(12).GetComponent <UIText>(); this.Front_OpenTimeText.font = this.tmpFont; this.AllText.Add(this.Front_OpenTimeText); this.Front_MessageText = this.tFront2.GetChild(13).GetComponent <UIText>(); this.Front_MessageText.font = this.tmpFont; this.Front_MessageText.text = this.DM.mStringTable.GetStringByID(12032u); this.AllText.Add(this.Front_MessageText); this.Front_ItemNameText = this.tFront2.GetChild(17).GetComponent <UIText>(); this.Front_ItemNameText.font = this.tmpFont; this.AllText.Add(this.Front_ItemNameText); this.Front_ItemCountText = this.tFront2.GetChild(18).GetComponent <UIText>(); this.Front_ItemCountText.font = this.tmpFont; this.AllText.Add(this.Front_ItemCountText); this.tFront2.GetChild(5).GetComponent <UIButton>().m_Handler = this; this.tFront2.GetChild(5).GetComponent <CustomImage>().hander = this; this.tFront2.GetChild(7).GetComponent <UIButton>().m_Handler = this; this.tFront2.GetChild(8).GetComponent <UIButton>().m_Handler = this; this.GM.InitianHeroItemImg(this.tFront2.GetChild(16), eHeroOrItem.Item, 10, 0, 0, 0, true, true, true, false); this.Front_ItemCountStr = StringManager.Instance.SpawnString(150); this.Front_HINTBtn = this.tFront2.GetChild(19).GetComponent <UIButton>(); this.Front_HINTBtn.m_Handler = this; this.Front_HINTBtn.m_BtnID2 = 2; UIButtonHint uibuttonHint2 = this.Front_HINTBtn.gameObject.AddComponent <UIButtonHint>(); uibuttonHint2.m_eHint = EUIButtonHint.DownUpHandler; uibuttonHint2.Parm1 = 12026; uibuttonHint2.m_DownUpHandler = this; this.tTimeObj = this.m_transform.GetChild(11); this.tTimeObj.GetChild(0).GetComponent <UIButton>().m_Handler = this; this.tTimeObj.GetChild(0).GetComponent <UIButton>().transition = Selectable.Transition.None; UIButtonHint uibuttonHint3 = this.tTimeObj.GetChild(0).gameObject.AddComponent <UIButtonHint>(); uibuttonHint3.m_eHint = EUIButtonHint.DownUpHandler; uibuttonHint3.Parm1 = 12048; uibuttonHint3.m_DownUpHandler = this; component = this.tTimeObj.GetChild(2).GetComponent <UIText>(); component.font = this.tmpFont; component.text = this.DM.mStringTable.GetStringByID(8110u); this.AllText.Add(component); this.CountTimeText = this.tTimeObj.GetChild(3).GetComponent <UIText>(); this.CountTimeText.font = this.tmpFont; this.AllText.Add(this.CountTimeText); this.CountTimeStr = StringManager.Instance.SpawnString(30); this.ActorT[0] = this.m_transform.GetChild(15); this.ActorT[1] = this.m_transform.GetChild(16); this.ActorT[2] = this.m_transform.GetChild(17); this.AB = AssetManager.GetAssetBundle("Role/darkbox", out this.AssetKey, false); if (this.AB != null) { this.AR = this.AB.LoadAsync("m", typeof(GameObject)); } if (this.GM.bOpenOnIPhoneX) { ((RectTransform)this.tFront2).offsetMin = new Vector2(-this.GM.IPhoneX_DeltaX, 0f); ((RectTransform)this.tFront2).offsetMax = new Vector2(this.GM.IPhoneX_DeltaX, 0f); } this.tFront2.GetComponent <RectTransform>().localPosition = Vector3.zero; this.tFront2.SetParent(this.GM.m_SecWindowLayer, false); this.CheckHaveText(); this.SetTimeText(); GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 2); }
// Use this for initialization void Start() { assetManager = GetComponent <AssetManager>(); }
static GeometryElementsInstanced() { graphicsDevice = Engine.Graphics.GraphicsDevice; polygonShader = AssetManager.GetEffect("Relatus_RelatusEffect"); polygonPass = polygonShader.Techniques[1].Passes[0]; }
// Token: 0x06000BD5 RID: 3029 RVA: 0x001131B0 File Offset: 0x001113B0 public void DelLine(int LineTableID, byte Send = 1, byte bDelAll = 0) { if (this.mapLineController != null && DataManager.MapDataController.MapLineTable[LineTableID].lineObject != null) { bool forceRemove = false; if (!GameConstants.IsPetSkillLine(LineTableID) && !GameConstants.IsSoccerRunningLine(LineTableID)) { if (DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 27 && NetworkManager.ServerTime - DataManager.MapDataController.MapLineTable[LineTableID].begin < 5.0) { this.mapTileController.UpdateMapNPCFighterLeave((uint)GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID), LineTableID); } else if (DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 12) { this.mapLineController.LastRallyName.ClearString(); this.mapLineController.LastRallyName.Append(DataManager.MapDataController.MapLineTable[LineTableID].playerName); } if (Send != 255 && (DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 5 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 6 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 7 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 12 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 9)) { bool flag = true; int num = GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID); POINT_KIND pointKind = (POINT_KIND)DataManager.MapDataController.LayoutMapInfo[num].pointKind; if (pointKind == POINT_KIND.PK_NONE) { flag = false; } else if (DataManager.MapDataController.IsResources((uint)num)) { int tableID = (int)DataManager.MapDataController.LayoutMapInfo[num].tableID; if (DataManager.CompareStr(DataManager.MapDataController.ResourcesPointTable[tableID].playerName, string.Empty) == 0) { flag = false; } } else if (pointKind == POINT_KIND.PK_CITY) { int tableID2 = (int)DataManager.MapDataController.LayoutMapInfo[num].tableID; if (DataManager.CompareStr(DataManager.MapDataController.PlayerPointTable[tableID2].allianceTag, DataManager.MapDataController.MapLineTable[LineTableID].allianceTag) == 0) { flag = false; } } if (flag) { FakeRetreat item = new FakeRetreat(0); item.point = DataManager.MapDataController.MapLineTable[LineTableID].end; item.point2 = DataManager.MapDataController.MapLineTable[LineTableID].start; item.lineFlag = (EMarchEventType)DataManager.MapDataController.MapLineTable[LineTableID].lineFlag; bool flag2 = true; ELineColor lineColor = ELineColor.BLUE; EUnitSide unitSide = EUnitSide.BLUE; DataManager.checkLineColorID(LineTableID, out lineColor, out unitSide, out flag2); item.unitSide = unitSide; item.lineColor = lineColor; item.playerName.ClearString(); item.playerName.Append(DataManager.MapDataController.MapLineTable[LineTableID].playerName); item.allianceTag.ClearString(); item.allianceTag.Append(DataManager.MapDataController.MapLineTable[LineTableID].allianceTag); item.emoji = DataManager.MapDataController.MapLineTable[LineTableID].emojiID; this.mapLineController.FakeRetreatList.Add(item); } } } else if (GameConstants.IsPetSkillLine(LineTableID)) { long num2 = (long)(DataManager.MapDataController.MapLineTable[LineTableID].begin + (ulong)DataManager.MapDataController.MapLineTable[LineTableID].during); uint during = DataManager.MapDataController.MapLineTable[LineTableID].during; if (during <= 2u || Math.Abs(num2 - DataManager.Instance.ServerTime) <= 1L) { Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; if (door == null || door.m_eMode == EUIOriginMode.Show) { byte lineFlag = DataManager.MapDataController.MapLineTable[LineTableID].lineFlag; MapDamageEffTb recordByKey = PetManager.Instance.MapDamageEffTable.GetRecordByKey((ushort)lineFlag); if (recordByKey.ID == (ushort)lineFlag) { float d = DataManager.MapDataController.zoomSize * this.CanvasrectranScale; Vector2 vector = this.mapTileController.getTilePosition(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID) * d; Vector3 value = new Vector3(vector.x, vector.y, 0f); CString cstring = StringManager.Instance.SpawnString(30); if (recordByKey.SoundPakNO != 0) { cstring.ClearString(); cstring.StringToFormat("Role/"); cstring.IntToFormat((long)recordByKey.SoundPakNO, 3, false); cstring.AppendFormat("{0}{1}"); if (AssetManager.GetAssetBundleDownload(cstring, AssetPath.Role, AssetType.HeroSFX, recordByKey.SoundPakNO, false)) { AudioManager.Instance.PlaySFX(recordByKey.HitSound, 0f, PitchKind.NoPitch, null, new Vector3?(value)); } } else { AudioManager.Instance.PlaySFX(recordByKey.HitSound, 0f, PitchKind.NoPitch, null, new Vector3?(value)); } if (recordByKey.ParticlePakNO != 0) { cstring.ClearString(); cstring.StringToFormat("Particle/Monster_Effects_"); cstring.IntToFormat((long)recordByKey.ParticlePakNO, 3, false); cstring.AppendFormat("{0}{1}"); if (AssetManager.GetAssetBundleDownload(cstring, AssetPath.Particle, AssetType.Effects, recordByKey.ParticlePakNO, false)) { DataManager.MapDataController.MapWeaponDefense(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID, recordByKey.HitParticle, (float)recordByKey.HitParticleDuring * 0.001f); } } else { DataManager.MapDataController.MapWeaponDefense(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID, recordByKey.HitParticle, (float)recordByKey.HitParticleDuring * 0.001f); } StringManager.Instance.DeSpawnString(cstring); } } } } else { forceRemove = true; if (bDelAll == 0) { MapLine mapLine = DataManager.MapDataController.MapLineTable[LineTableID]; if ((mapLine.lineFlag & 56) == 56) { if (mapLine.start.zoneID != mapLine.end.zoneID || mapLine.start.pointID != mapLine.end.pointID) { Vector3 b = this.PointCodeToWorldPosition(mapLine.start.zoneID, mapLine.start.pointID); Vector3 vector2 = this.PointCodeToWorldPosition(mapLine.end.zoneID, mapLine.end.pointID); this.mapLineController.addSoccerFakeLine(vector2, new Vector3?(vector2 - b), 0); } } else { long num3 = (long)(mapLine.begin + (ulong)mapLine.during); uint during2 = mapLine.during; long num4 = Math.Abs(num3 - DataManager.Instance.ServerTime); if (during2 <= 2u || num4 <= 1L) { this.mapLineController.CheckTouchDownPosEffect(mapLine.end.zoneID, mapLine.end.pointID); } LineNode nodeByGameObject = this.mapLineController.GetNodeByGameObject(DataManager.MapDataController.MapLineTable[LineTableID].lineObject, false); this.mapLineController.PlaySoccerArrive(nodeByGameObject); } } } Send = ((Send != byte.MaxValue) ? Send : 1); if (bDelAll != 0) { forceRemove = true; } this.mapTileController.CheckDelFocusGroup(LineTableID, Send); this.mapLineController.CheckRemoveLine(DataManager.MapDataController.MapLineTable[LineTableID].lineObject, forceRemove); } }
private void CreateButtons(Mission[] missions, ExtendedTimer[] timer) { Texture2D bgAvailable = AssetManager.TextureAsset("button_background_available"); Texture2D bgSelected = AssetManager.TextureAsset("button_background_hovered"); Texture2D bgUnavailable = AssetManager.TextureAsset("button_background_unavailable"); buttons = new List <MissionInterfaceButton>(); for (int i = 0; i < missions.Length; i++) { if (missions[i] == null) { buttons.Add(new MissionInterfaceButton(new Rectangle(bounds.X + 125, bounds.Y + 65 + (85 * i), 550, 80), bgAvailable, bgSelected, bgUnavailable, null, timer[i], "", AssetManager.FontAsset("default_font"))); continue; } string missionText = ""; if (missions[i] != null) { missionText = missions[i].Text(); } buttons.Add(new MissionInterfaceButton(new Rectangle(bounds.X + 125, bounds.Y + 65 + (85 * i), 550, 80), bgAvailable, bgSelected, bgUnavailable, missions[i], timer[i], missions[i].Text(), AssetManager.FontAsset("default_font"))); } acceptMissionButton = new UIButton(new Rectangle(bounds.X + 499, bounds.Y + 481, 60, 59), () => { Accept(); }); denyMissionButton = new UIButton(new Rectangle(bounds.X + 600, bounds.Y + 481, 60, 59), () => { Deny(); }); }