void Blegh(object sender, OnHitEventArgs e) { if (attack.specialQuality != Specials.Piercing) { animator.GetComponent <OffensiveHitboxManager> ().DeactivateHitbox((int)attack.activeHitbox); } Debug.Log(e.hitbox + "is" + e.hitbox.activeSelf); }
void OnTriggerEnter(Collider col) { OnHitEventArgs e = new OnHitEventArgs(col.GetComponent <DefenseLogic> (), gameObject); if (OnHit != null) { OnHit(this, e); } }
private void HandleOnHit(object sender, OnHitEventArgs e) { /* if (e.HitInstrument == this.transform.parent.gameObject.GetComponent<CylinderBeatAnimator> ().Instrument) { Explode (); } */ }
public void Impact(object sender, OnHitEventArgs e) { OnHitEventArgs ev = new OnHitEventArgs(e.defenseLogic, e.hitbox); if (OnHit != null) { OnHit(this, ev); } }
public void AnalyseHit(object sender, OnHitEventArgs hitData) { DefenseLogic logic = hitData.defenseLogic; if (logic.activeStatus != DefenseLogic.Status.Idle) { if (logic.activeStatus == DefenseLogic.Status.Parrying) { gameObject.GetComponent <Animator> ().SetTrigger("Bounce"); } } }
private void OctreeLineGeometryModel3D_OnHit(object sender, OnHitEventArgs args) { var node = sender as IOctree; if (node.HitPathBoundingBoxes.Count > 0 && Visibility == Visibility.Visible && IsRendering) { HitVisual.Geometry = node.HitPathBoundingBoxes.CreatePathLines(); HitVisual.Color = HitLineColor; } else { HitVisual.Geometry = null; } }
public void AnalyseHit(object sender, OnHitEventArgs hitData) { }
void HandleOnHit(object sender, OnHitEventArgs e) { if (MenuIsOpen) { //Invoke("UpdateSongText",0); //Just to start the song if (e.HitInstrument == DrumKit.Instrument.Bass) { Debug.Log ("Playin billie jean from ninetyfour a long time ago"); GameObject.Find ("ReferenceImageTarget").transform.FindChild("BeatVisualizer").FindChild ("Explosions").GetComponent<ParticleSystem> ().Play(); //Debug.Log (GameController.SongItems [songSelected % GameController.SongItems.Count].ToString ()); //Shit dissapears Invoke("ShutTheMenuDown",0); Invoke("PlayBillieJean",1.0f); } /* // UP if (e.HitInstrument == DrumKit.Instrument.Snare) { currentlySelected++; if (level == 0) { currentlySelected = currentlySelected % 4; UpdateMenuText (); } if (level == 2 && menuChoice == 0) { currentlySelected = currentlySelected % difficulty.Count; UpdateDifficulty (); } if (level == 1 && menuChoice == 0) { currentlySelected = currentlySelected % GameController.SongItems.Count; UpdateSongText (); } if (level == 1 && menuChoice == 1) { UpdateBeatText (); } } // DOWN if (e.HitInstrument == DrumKit.Instrument.TomHigh && currentlySelected > 0) { currentlySelected--; if (level == 0) { currentlySelected = currentlySelected % 4; UpdateMenuText (); } if (level == 2 && menuChoice == 0) { currentlySelected = currentlySelected % difficulty.Count; UpdateDifficulty (); } if (level == 1 && menuChoice == 0) { currentlySelected = currentlySelected % 4; UpdateSongText (); } if (level == 1 && menuChoice == 1) { UpdateBeatText (); } } // SELECT if (e.HitInstrument == DrumKit.Instrument.HiHat) { //Select Song if (level == 2 && menuChoice == 0) { level = 0; int songSelectedExtra = songSelected; int currentlySelectedExtra = currentlySelected; songSelected = 0; currentlySelected = 0; menuChoice = 9001; GameController.GetInstance ().Play (songSelectedExtra, currentlySelectedExtra); Debug.Log (GameController.SongItems [songSelected % GameController.SongItems.Count].ToString ()); //Shit dissapears ShutTheMenuDown (); } if (level == 1 && menuChoice == 0) { level++; songSelected = currentlySelected; currentlySelected = 0; UpdateDifficulty (); } if (level == 1 && menuChoice == 1) { GameController.GetInstance ().PlayDrumBeats (currentlySelected); Debug.Log (GameController.DrumBeatsItems [currentlySelected % GameController.DrumBeatsItems.Count].ToString ()); //Shit dissapears ShutTheMenuDown (); } if ((currentlySelected == 0) && level == 0) { //always reset to 0 level++; menuChoice = currentlySelected; currentlySelected = 0; //Select a song. UpdateSongText (); } //Select Beat if ((currentlySelected == 1) && level == 0) { level++; menuChoice = currentlySelected; currentlySelected = 0; UpdateBeatText (); } //Select Recording if ((currentlySelected == 2) && level == 0) { level++; menuChoice = currentlySelected; currentlySelected = 0; } //Start Recording if ((currentlySelected == 3) && level == 0) { level++; menuChoice = currentlySelected; currentlySelected = 0; } //menuItems[currentlySelected]; } if (e.HitInstrument == DrumKit.Instrument.CymbalCrash) { if (level > 0) { level = 0; menuChoice = 9001; currentlySelected = 0; UpdateMenuText (); } // add for different. }*/ } }
private static void HandleOnHit(object sender, OnHitEventArgs e) { recordBeat (e.HitInstrument); }