public InterruptionEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, long starttime = 0) : base(library, baseIndex, count, duration, owner) { Repeat = true; Blend = blend; effectlist.Add(this); }
private bool CheckDownloadRequireLibrary(MLibrary lib) { return(lib.IsRequire && !string.IsNullOrEmpty(lib.Path) && !string.IsNullOrEmpty(lib.Url) && !CheckFileValidation(Path.Combine(MinecraftPath.Library, lib.Path), lib.Hash)); }
public BuffEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, BuffType buffType) : base(library, baseIndex, count, duration, owner, 0) { Repeat = true; Blend = blend; BuffType = buffType; Light = -1; }
public SpecialEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, bool drawBehind, uint type) : base(library, baseIndex, count, duration, owner, 0, drawBehind) { Blend = blend; DrawBehind = drawBehind; EffectType = type; Light = -1; }
public Missile(MLibrary library, int baseIndex, int count, int duration, Point source, Point target) : base(library, baseIndex, count, duration, source) { Missiles.Add(this); Destination = target; Direction = MapControl.Direction16(Source, Destination); }
public Missile(MLibrary library, int baseIndex, int count, int duration, MapObject owner, Point target, bool direction16 = true) : base(library, baseIndex, count, duration, owner) { Missiles.Add(this); Source = Owner.CurrentLocation; Destination = target; Direction = direction16 ? MapControl.Direction16(Source, Destination) : (int)Functions.DirectionFromPoint(Source, Destination); }
void App_Exit(object sender, ExitEventArgs e) { try { MLibrary.cleanup(); } catch (System.Exception ex) { MessageBox.Show(ex.Message, "Error during Maya API cleanup"); return; } }
bool loopit = false; //soundloop public ElementsEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, int elementType, int killtime, bool loopon = false) : base(library, baseIndex, count, duration, owner) { Repeat = true; Blend = blend; myType = elementType; killAt = killtime; // loopit = loopon; StopSounds(); StartSound(); }
public Effect(MLibrary library, int baseIndex, int count, int duration, Point source, long starttime = 0, bool drawBehind = false) { Library = library; BaseIndex = baseIndex; Count = count == 0 ? 1 : count; Duration = duration; Start = starttime == 0 ? CMain.Time : starttime; NextFrame = Start + (Duration / Count) * (CurrentFrame + 1); Source = source; DrawBehind = drawBehind; }
public Effect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, long starttime = 0, bool drawBehind = false) { Library = library; BaseIndex = baseIndex; Count = count == 0 ? 1 : count; Duration = duration; Start = starttime == 0 ? CMain.Time : starttime; NextFrame = Start + (Duration / Count) * (CurrentFrame + 1); Owner = owner; Source = Owner.CurrentLocation; DrawBehind = drawBehind; }
public Effect(MLibrary library, int baseIndex, int count, int duration, Point source, long starttime = 0, bool drawBehind = false, int lightDistance = 6, Color?lightColour = null) { Library = library; BaseIndex = baseIndex; Count = count == 0 ? 1 : count; Duration = duration; Start = starttime == 0 ? CMain.Time : starttime; Light = lightDistance; LightColour = lightColour == null ? Color.White : (Color)lightColour; NextFrame = Start + (Duration / Count) * (CurrentFrame + 1); Source = source; DrawBehind = drawBehind; }
public DelayedExplosionEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, int Stage, long until) : base(library, baseIndex, count, duration, owner) { Repeat = (Stage == 2) ? false : true; Blend = blend; stage = Stage; effectlist.Add(this); if (stage == 1) { SoundManager.PlaySound(20000 + 125 * 10); } if (stage == 2) { SoundManager.PlaySound(20000 + 125 * 10 + 5); } }
void App_Startup(object sender, StartupEventArgs e) { try { MLibrary.initialize("MayaWpfStandAlone"); bool bSuccess = MayaTheme.Initialize(this); string fileName; string [] args = Environment.GetCommandLineArgs(); if (args.Length <= 1) { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.FileName = "Maya Files"; // Default file name dlg.DefaultExt = ".ma"; // Default file extension dlg.Filter = "Maya Files (.ma/.mb)|*.ma;*.mb|Maya ASCII (.ma)|*.ma|Maya Binary (.mb)|*.mb|All files (*.*)|*.*"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { fileName = dlg.FileName; } else { return; } } else { fileName = args [1]; } MFileIO.newFile(true); fileName = fileName.Replace('\\', '/'); MFileIO.open(fileName); } catch (System.Exception ex) { MessageBox.Show(ex.Message, "Error during Maya API initialization. This program will exit"); Application.Current.Shutdown(); } }
public virtual Missile CreateProjectile(int baseIndex, MLibrary library, bool blend, int count, int interval, int skip, int lightDistance = 6, bool direction16 = true, Color?lightColour = null, uint targetID = 0) { return(null); }