private void OnTriggerEnter(Collider other) { if (currentHandState == HandState.Fired) { if (other.tag == "Player") { playerScript = other.transform.parent.GetComponent <PF_Player>(); playerScript.SetCanMove(false); playerScript.ModifyCurrentHealth(-grabDamage); //Craig Added learning data var learning = FindObjectOfType <BossAttacks>(); learning.BlockLearn.Data.Add(new NaiveBayesLearning.InformationModel() { Lable = "Hand", Features = new List <string>() { "Hit", "Attack" } }); other.transform.parent.transform.parent = transform; currentHandState = HandState.Retract; } } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { playerScript.ModifyCurrentHealth(damage * -1); var learning = FindObjectOfType <BossAttacks>(); learning.GetComponent <BossAttacks>().BlockLearn.Data.Add(new NaiveBayesLearning.InformationModel() { Lable = "Melee", Features = new List <string>() { "Hit", "Attack" } }); } }
//DO DAMAGE private void OnTriggerEnter(Collider other) { if (other.gameObject == playerModel) { playerScript.ModifyCurrentHealth(damage * -1); //Craig Added Learning var learning = FindObjectOfType <BossAttacks>(); learning.GetComponent <BossAttacks>().BlockLearn.Data.Add(new NaiveBayesLearning.InformationModel() { Lable = "Bullet", Features = new List <string>() { "Hit", "Attack" } }); //Send msg to bullet pattern bulletPattern.destroyedBullets++; Destroy(this.gameObject); } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (!damageDone) { playerScript.ModifyCurrentHealth(-explosionDamage); //Craig Added Learning var learning = FindObjectOfType <BossAttacks>(); damageDone = true; learning.BlockLearn.Data.Add(new NaiveBayesLearning.InformationModel() { Lable = "Spawn", Features = new List <string>() { "Hit", "Attack" } }); } } }
private void ApplyPowerup() { playerScript.ModifyCurrentHealth(healthValue); }