private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Unit") { iUnit unit = collision.gameObject.GetComponent <iUnit>(); unit.takeDamage(999); Debug.Log("Boat Took Damage"); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Unit") { iUnit unit = collision.gameObject.GetComponent <iUnit>(); unit.takeDamage(damage); Debug.Log("Boat or Wall Took Damage"); GetDestroyed(); } else if (collision.gameObject.tag == "City") { GameManager.instance.DamageCity(1); //collision.gameObject.SetActive(false); GetDestroyed(); } }
public string removeCollectionType([FromBody] iUnit parser) { parser.setConnectionString(connectionstring_global); return(parser.dbDelete()); }
public string editCollectionType([FromBody] iUnit parser) { parser.setConnectionString(connectionstring_global); return(parser.dbUpdate()); }
public string newCollectionType([FromBody] iUnit parser) { parser._unitCode = "0"; parser.setConnectionString(connectionstring_global); return(parser.dbInsert()); }