コード例 #1
0
        public static EnemyBullet CreateNew(Layer layer)
        {
            if (string.IsNullOrEmpty(mContentManagerName))
            {
                throw new System.Exception("You must first initialize the factory to use it.");
            }
            EnemyBullet instance = null;

            instance = new EnemyBullet(mContentManagerName, false);
            instance.AddToManagers(layer);
            if (mScreenListReference != null)
            {
                mScreenListReference.Add(instance);
            }
            if (EntitySpawned != null)
            {
                EntitySpawned(instance);
            }
            return(instance);
        }