コード例 #1
0
        public static GameObject Create(CreateParams params_)
        {
            if (!_enable)
            {
                return(null);
            }

            switch (params_.data.Type)
            {
            case DataTypes.BULLET:
                return(Create <BulletController>(new BulletModel(params_.data as BulletData), params_).gameObject);

            case DataTypes.ENEMY:
                EnemyData  data  = params_.data as EnemyData;
                EnemyModel enemy = new EnemyModel(data);
                enemy.InitMoveParams(10f, 1.0f);
                return(Create <EnemyController>(enemy, params_).gameObject);

            case DataTypes.HERO:
                return(Create <HeroController>(new HeroModel((params_.data as HeroData)), params_).gameObject);

            default:
                return(null);
            }
        }