Ejemplo n.º 1
0
 public virtual void Execute(ProductionInfo information, IProductionObserver observer)
 {
     if (information.inputManager.StartButton == 1)
     {
         skip = true;
     }
 }
Ejemplo n.º 2
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            base.Execute(information, observer);

            if (skip)
            {
                float target_x = information.camera.transform.eulerAngles.x + euler_x * counter;
                float target_y = information.camera.transform.eulerAngles.y + euler_y * counter;
                float target_z = information.camera.transform.eulerAngles.z + euler_z * counter;

                information.camera.transform.eulerAngles = new Vector3(target_x, target_y, target_z);
                observer.NextCommand();
            }
            else
            {
                float target_x = information.camera.transform.eulerAngles.x + euler_x;
                float target_y = information.camera.transform.eulerAngles.y + euler_y;
                float target_z = information.camera.transform.eulerAngles.z + euler_z;

                counter--;
                information.camera.transform.eulerAngles = new Vector3(target_x, target_y, target_z);

                if (counter <= 0)
                {
                    observer.NextCommand();
                }
            }
        }
Ejemplo n.º 3
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            float alpha = Mathf.Lerp(1f, 0f, 1f - ((float)counter / (float)time));

            foreach (Image texture in textures)
            {
                if (texture != information.fadeBackGroung && texture != null)
                {
                    texture.color = new Color(1f, 1f, 1f, alpha);
                }
            }
            counter--;

            if (counter <= 0)
            {
                foreach (Image texture in textures)
                {
                    if (texture != information.fadeBackGroung && texture != null)
                    {
                        MonoBehaviour.Destroy(texture.gameObject);
                    }
                }

                observer.NextCommand();
            }
        }
Ejemplo n.º 4
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            float amount = Mathf.Lerp(0f, 1f, 1f - ((float)counter / (float)time));

            image.fillAmount = amount;
            counter--;

            if (counter <= 0)
            {
                observer.NextCommand();
            }
        }
Ejemplo n.º 5
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            float alpha = Mathf.Lerp(current, target, 1f - ((float)counter / (float)time));

            information.fadeBackGroung.color = new Color(1f, 1f, 1f, alpha);
            counter--;

            if (counter <= 0)
            {
                observer.NextCommand();
            }
        }
Ejemplo n.º 6
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            float alpha = Mathf.PingPong(Time.time, target) / target;

            blinkImage.color = new Color(0.5f, 0.5f, 0.5f, alpha);

            if (information.inputManager.StartButton == 1)
            {
                information.soundManager.PlaySE(0);
                observer.NextCommand();
            }
        }
Ejemplo n.º 7
0
        // Use this for initialization
        void Start()
        {
            GameObject gameObject = new GameObject();

            canvas            = gameObject.AddComponent <Canvas> ();
            canvas.name       = "Canvas";
            canvas.renderMode = RenderMode.ScreenSpaceOverlay;

            InputManager inputManager = GetComponent <InputManager> ();
            SoundManager soundManager = inputManager.GetComponent <SoundManager> ();
            DataManager  dataManager  = DataManager.GetInstance();

            productionList = new List <BaseProduction> ();
            menu           = new TitleMenu(canvas, soundManager);
            productionList = menu.GetProductionList();
            productionList[currentScript].CreateProduction(canvas);

            information = new ProductionInfo(GetComponent <Camera> (), inputManager, dataManager, inputManager.GetComponent <SoundManager> ());
            information.CreateFadeBackGround(canvas);
        }
Ejemplo n.º 8
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            counter -= speed;
            if (counter < 0)
            {
                counter = 0;
            }
            speed -= 0.1f;

            speed = Mathf.Clamp(speed, 0.1f, 3f);

            float next_x = Mathf.Lerp(currentPos.x, targetPos.x, 1f - ((float)counter / (float)time));
            float next_y = Mathf.Lerp(currentPos.y, targetPos.y, 1f - ((float)counter / (float)time));

            image.rectTransform.position = new Vector3(next_x, next_y, 0f);

            if (counter <= 0)
            {
                observer.NextCommand();
            }
        }
Ejemplo n.º 9
0
        public override void Execute(ProductionInfo information, IProductionObserver observer)
        {
            base.Execute(information, observer);

            if (skip)
            {
                fadeImage.color = new Color(1f, 1f, 1f, target);
                observer.NextCommand();
            }
            else
            {
                float alpha = Mathf.Lerp(current, target, 1f - ((float)counter / (float)time));

                fadeImage.color = new Color(1f, 1f, 1f, alpha);
                counter--;

                if (counter <= 0)
                {
                    observer.NextCommand();
                }
            }
        }
Ejemplo n.º 10
0
 public override void Execute(ProductionInfo information, IProductionObserver observer)
 {
     information.soundManager.PlayBGM(bgmNumber);
     observer.NextCommand();
 }
Ejemplo n.º 11
0
 public override void Execute(ProductionInfo information, IProductionObserver observer)
 {
     observer.CreateMenu();
     observer.NextCommand();
 }