Exemplo n.º 1
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();
                }
            }
        }
Exemplo n.º 2
0
 public virtual void Execute(ProductionInfo information, IProductionObserver observer)
 {
     if (information.inputManager.StartButton == 1)
     {
         skip = true;
     }
 }
Exemplo n.º 3
0
        public override void Execute(InputManager inputManager, IProductionObserver observer)
        {
            if (counter > 0)
            {
                counter--;

                foreach (AnimationLabel lab in labelList)
                {
                    lab.ButtonAnimation();
                    if (counter == 0)
                    {
                        lab.ClearAmount();
                    }
                }
            }
            else
            {
                if (inputManager.DecisionButton == 1)
                {
                    ButtonEvent();
                }

                if (inputManager.CancelButton == 1)
                {
                    CancelEvent();
                }
            }
        }
Exemplo n.º 4
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();
            }
        }
Exemplo n.º 5
0
        public override void Execute(InputManager inputManager, IProductionObserver observer)
        {
            if (counter > 0)
            {
                counter--;

                foreach (AnimationLabel lab in labelList)
                {
                    lab.ButtonAnimation();
                    if (counter == 0)
                    {
                        lab.ClearAmount();
                    }
                }

                foreach (AnimationButton button in buttonList)
                {
                    button.ButtonAnimation();
                    if (counter == 0)
                    {
                        button.ClearAmount();
                    }
                }
            }
            else
            {
                if (isDelete)
                {
                    Delete();
                    observer.NextMenu();
                    return;
                }

                if (inputManager.StickUD == 1)
                {
                    cursor.ChangeSelect(1);
                    ChangeEvent(-1);

                    explanatoryText.ChangeSprite(buttonList[cursor.select].id);
                }
                else if (inputManager.StickUD == -1)
                {
                    cursor.ChangeSelect(-1);
                    ChangeEvent(1);

                    explanatoryText.ChangeSprite(buttonList[cursor.select].id);
                }

                if (inputManager.DecisionButton == 1)
                {
                    ButtonEvent();
                }

                if (inputManager.CancelButton == 1)
                {
                    CancelEvent();
                    observer.Rewind(6);
                }
            }
        }
Exemplo n.º 6
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();
            }
        }
Exemplo n.º 7
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();
            }
        }
Exemplo n.º 8
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();
            }
        }
Exemplo n.º 9
0
        public override void Execute(InputManager inputManager, IProductionObserver observer)
        {
            if (counter > 0)
            {
                counter--;

                foreach (AnimationLabel lab in labelList)
                {
                    lab.ButtonAnimation();
                    if (counter == 0)
                    {
                        lab.ClearAmount();
                    }
                }
            }
            else
            {
                cursor_a.CursorAnimation();
                if (isDelete)
                {
                    Delete();
                    return;
                }

                if (inputManager.StickLR == 1)
                {
                    cursor_a.ChangeSelect(1);
                    ChangeEvent(-1);
                }
                else if (inputManager.StickLR == -1)
                {
                    cursor_a.ChangeSelect(-1);
                    ChangeEvent(1);
                }


                if (inputManager.DecisionButton == 1)
                {
                    ButtonEvent();
                }

                if (inputManager.CancelButton == 1)
                {
                    bool rewind = preview;
                    CancelEvent();
                    if (!rewind)
                    {
                        observer.Rewind(6);
                    }
                }
            }
        }
Exemplo n.º 10
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();
            }
        }
Exemplo n.º 11
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();
                }
            }
        }
Exemplo n.º 12
0
 public virtual void Execute(InputManager inputManager, IProductionObserver observer)
 {
 }
Exemplo n.º 13
0
 public override void Execute(ProductionInfo information, IProductionObserver observer)
 {
     information.soundManager.PlayBGM(bgmNumber);
     observer.NextCommand();
 }
Exemplo n.º 14
0
 public override void Execute(ProductionInfo information, IProductionObserver observer)
 {
     observer.CreateMenu();
     observer.NextCommand();
 }