/** * determines, if the chosen GameObject already contains a HookableObject * * @param place chosen spawn place for a HookableObject * @returns true, if the gameObject contains a SpawnPlace and it contains a HookableObject */ private static bool ContainsHookableObject(SpawnPlace place) { //var spawn = place.GetComponent<SpawnPlace>(); return(place != null && (place.ContainsStone() || place.ContainsItem())); }
/** * determines, if the chosen GameObject already contains an item * * @param place chosen spawn place for a item * @returns true, if the gameObject contains a SpawnPlace and it contains a item */ private static bool ContainsItem(SpawnPlace place) { //var spawn = place.GetComponent<SpawnPlace>(); return(place != null && place.ContainsItem()); }