// Use this for initialization void Start() { match_music.clip = staticstuff.SelectedMusic.audio; Onsetfile = staticstuff.SelectedMusic.onset; segmentfile = staticstuff.SelectedMusic.segment; Beatfile = staticstuff.SelectedMusic.beat; Pitchfile = staticstuff.SelectedMusic.pitch; parser = new CSVParser(); musicinfo = new MusicInfoScript(); musicprocess = new MusicProcessor(musicinfo); bulletsystem = new BulletSystemControl(defaultenemybullet, origin, bulletrepo); bulletcontroler.musicinfo = musicinfo; musicprocess.processMusicOnset(parser.parseFile(Onsetfile)); musicprocess.processMusicSegment(parser.parseFile(segmentfile)); musicprocess.processMusicBeat(parser.parseFile(Beatfile)); musicprocess.processMusicPitch(parser.parseFile(Pitchfile)); Debug.Log("music loaded"); musicinfo.calculateValues(); Debug.Log("Info calced"); bulletsystem.createpatterns(musicinfo); Debug.Log("Patterns loaded"); bulletcontroler.loadBullets(bulletsystem.createBullets()); Debug.Log("bullets created"); loadanim = new LoadAnimation(); animations = loadanim.load(staticstuff.SelectedSprite); shipanimations.Init(animations, staticstuff.SelectedSprite.config.frame_length, staticstuff.SelectedSprite.config.frames_per_line - 2); colliderbox.size = (new Vector2((float)(staticstuff.SelectedSprite.config.width / staticstuff.SelectedSprite.config.pixel_per_unit * 0.6), (float)(staticstuff.SelectedSprite.config.height / staticstuff.SelectedSprite.config.pixel_per_unit * 0.6))); Debug.Log("sprite loaded"); player.Xvelocity = staticstuff.config.x_velocity; player.Yvelocity = staticstuff.config.y_velocity; player.usemouse = staticstuff.config.use_mouse; player.mousesensitivity = staticstuff.config.mouse_sensitivity; Debug.Log("loaded config"); int musiclength = (int)match_music.clip.length; enemy.sethp(7 * (musiclength / 10)); player.sethp(5 * (musiclength / 10)); enemy.punchdmg = (int)player.HP / 20; hud.musiclenght = musiclength; bulletcontroler.audiosource.Play(); Cursor.visible = false; Debug.Log("Music activated START THE HELL"); }
/// <summary> /// Pass the desired <see cref="Enums.LoadAnimation"/> and <see cref="Enums.UnloadAnimation"/> to the Constructor /// </summary> /// <param name="loadAnimation">Animate the View in when it's loaded</param> /// <param name="unloadAnimation">Animate the View out when it's unloaded</param> public BaseUserControl( IEventAggregator eventAggregator, LoadAnimation loadAnimation, UnloadAnimation unloadAnimation) { LoadAnimation = loadAnimation; UnloadAnimation = unloadAnimation; // If we are animating in, hide to begin with if (LoadAnimation != LoadAnimation.None) { Visibility = Visibility.Collapsed; } // Listen out for the page loading Loaded += BaseUserControl_LoadedAsync; EventAggregator = eventAggregator; }
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { //if (Application.platform == RuntimePlatform.Android) //{ //Handheld.Vibrate(); //} ScanPanel.SetActive(false); arCam.SetActive(false); Map.SetActive(true); BackButton.SetActive(true); LoadAnimation scriptToAccess = objectToAccess.GetComponent <LoadAnimation>(); scriptToAccess.moveArrowAndCamera(mTrackableBehaviour.TrackableName + "_location"); } else { arCam.SetActive(true); Map.SetActive(false); } }