Esempio n. 1
0
    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();
        }
    }
Esempio n. 2
0
    public string GetObjType(GameObject obj)
    {
        IId id = obj.GetComponent <IId>();

        if (id != null)
        {
            return(id.GetObjType());
        }
        else
        {
            return(null);
        }
    }