private void OnCollisionEnter2D(Collision2D collision) { IId id = collision.gameObject.GetComponent <IId>(); if (id != null) { id.GetId(); } }
private void PickSpawnablesAtRandom() { var theObj = spawnablesList[Random.Range(0, spawnablesList.Count)]; IId id = theObj.GetComponent <IId>(); if (id != null) { spawnObjId = id.GetId(); spawnObjType = id.GetObjType(); } }
public string GetObjId(GameObject obj) { IId id = obj.GetComponent <IId>(); if (id != null) { return(id.GetId()); } else { return(null); } }
public ILMember GetInfoMember(IId member) { if (member.GetId() == master.GetMemberId().GetId()) return master; else if (member.GetId() == slave.GetMemberId().GetId()) return slave; return null; }