示例#1
0
    public GameBuilder(GameObject gameObject,
                       ISetting setting,
                       IParticleSpawner particleSpawner,
                       IBlockColorRepository blockColorRepository,
                       List <IGroupPattern> groupPatterns,
                       IBackgroundFactory backgroundFactory,
                       ICameraManager cameraManager,
                       IBlockViewSpawner blockViewSpawner,
                       IFloatingTextRenderer floatingTextRenderer)
    {
        gameObject.transform.localScale = new Vector3(setting.ScalePerBlock, setting.ScalePerBlock, 1);
        setting.Parent = gameObject.transform;

        setting.ParticleSpawner      = particleSpawner;
        setting.BlockColorRepository = blockColorRepository;
        setting.FloatingTextRenderer = floatingTextRenderer;

        _gameObject    = gameObject;
        _setting       = setting;
        _groupPatterns = groupPatterns;

        _backgroundFactory = backgroundFactory;
        _cameraManager     = cameraManager;
        _blockViewSpawner  = blockViewSpawner;
    }
示例#2
0
    IEnumerator CompleteDeleting(float waitTime, IParticleSpawner particleSpawner)
    {
        coroutineStarted = true;
        CreateParticle(particleSpawner);
        PlaySound(SoundName.Delete);

        float endTime = Time.time + waitTime;

        while (endTime > Time.time)
        {
            yield return(null);
        }


        isDeleting = false;
        Destroy(gameObject, 0.5f);
    }
示例#3
0
 void CreateParticle(IParticleSpawner particleSpawner)
 {
     particleSpawner.SpawnParticle(Setting, transform.position, Color);
 }
示例#4
0
 void CreateParticle(IParticleSpawner particleSpawner)
 {
     particleSpawner.SpawnParticle(Setting, transform.position, Color);
 }
示例#5
0
    IEnumerator CompleteDeleting(float waitTime, IParticleSpawner particleSpawner)
    {
        coroutineStarted = true;
        CreateParticle(particleSpawner);
        PlaySound(SoundName.Delete);

        float endTime = Time.time + waitTime;
        while(endTime > Time.time)
        {
            yield return null;
        }

        isDeleting = false;
        Destroy(gameObject, 0.5f);
    }