public void EnemyCollidedWithPlayer(CollisionModel model) { // Debug.Log("enemy collision detected"); var enemyController = model.mainCollider.GetComponent <AIController> (); var enemy = model.mainCollider.GetComponent <IEnemy> (); var position = (Vector2)model.mainCollider.transform.position; if (enemy.lifeDown(playerStatsLogic.Strength)) //if enemy dead { scoreLogic.addPoint(new AddPointModel { type = enemyController.type, combo = playerStatsLogic.combo }); missionLogic.addKill(enemyController.type); LeanTween.cancel(model.mainCollider.gameObject, false); if (Time.timeScale != 0) //could happen in super hit power up { enemy.Split(position); enemy.Death(); } } }
public void addScore(AddPointModel model) { scoreLogic.addPoint(model); }