Пример #1
0
    public static EnemyBulletScript Create(Transform _parent, Consts.MoveDirection _moveDirection)
    {
        GameObject        pre    = Resources.Load("Prefabs/Game/EnemyBullet", typeof(GameObject)) as GameObject;
        GameObject        bullet = GameObject.Instantiate(pre, BgScript.s_instance.map);
        EnemyBulletScript script = bullet.GetComponent <EnemyBulletScript>();

        script.setData(_parent, _moveDirection);
        return(script);
    }