Esempio n. 1
0
        public static PoolDataController SpawnFromGroup(string group, string type, string name, Transform toParent, Vector2 position, GenericParams parms)
        {
            PoolController pc = GetPool(group);

            if (pc != null)
            {
                return(pc._Spawn(type, name, toParent, new Vector3(position.x, position.y, 0f), null, parms));
            }

            return(null);
        }
Esempio n. 2
0
        public static PoolDataController SpawnFromGroup(string group, string type, string name, Transform toParent, Vector3 position, Quaternion rotation, GenericParams parms)
        {
            PoolController pc = GetPool(group);

            if (pc != null)
            {
                return(pc._Spawn(type, name, toParent, position, rotation, parms));
            }

            return(null);
        }
Esempio n. 3
0
        public static T SpawnFromGroup <T>(string group, string type, string name, Transform toParent, Vector3 position, GenericParams parms)
        {
            PoolController pc = GetPool(group);

            if (pc != null)
            {
                var spawned = pc._Spawn(type, name, toParent, position, null, parms);
                if (spawned)
                {
                    return(spawned.GetComponent <T>());
                }
            }

            return(default(T));
        }