コード例 #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Unit")
        {
            iUnit unit = collision.gameObject.GetComponent <iUnit>();

            unit.takeDamage(999);
            Debug.Log("Boat Took Damage");
        }
    }
コード例 #2
0
    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();
        }
    }
コード例 #3
0
 public string removeCollectionType([FromBody] iUnit parser)
 {
     parser.setConnectionString(connectionstring_global);
     return(parser.dbDelete());
 }
コード例 #4
0
 public string editCollectionType([FromBody] iUnit parser)
 {
     parser.setConnectionString(connectionstring_global);
     return(parser.dbUpdate());
 }
コード例 #5
0
 public string newCollectionType([FromBody] iUnit parser)
 {
     parser._unitCode = "0";
     parser.setConnectionString(connectionstring_global);
     return(parser.dbInsert());
 }