예제 #1
0
 private void SetTaskShotText(ShotType shotType, bool animated)
 {
     if (animated)
     {
         this.DoRoutine(0.25f, endAction: () => {
             taskShotText.text = $"{shotType.ToString().ToSpaceBeforeUpperCase()}";
         });
     }
     else
     {
         taskShotText.text = shotType.ToString().ToSpaceBeforeUpperCase();
     }
 }
예제 #2
0
    void Start()
    {
        Instance = this;
        setting  = true;

        prim_shot   = ShotType.FourWay;
        seco_shot   = ShotType.FourWay;
        select_prim = true;

        primary.GetComponent <Text>().text   = prim_shot.ToString();
        secondary.GetComponent <Text>().text = seco_shot.ToString();
    }
예제 #3
0
    private void SetSelectedShotType(ShotType shotType, bool animated)
    {
        if (shotType == selectedShotType)
        {
            return;
        }

        if (animated)
        {
            selectedShotType = shotType;

            this.DoRoutine(0.25f, endAction: () => {
                shotSelectionText.text = $"{shotType.ToString().ToSpaceBeforeUpperCase()}";
            });
        }
        else
        {
            selectedShotType       = shotType;
            shotSelectionText.text = $"{shotType.ToString().ToSpaceBeforeUpperCase()}";
        }
    }
예제 #4
0
    void FixedUpdate()
    {
        if (!player)
        {
            player = GameController.Instance.playerObj.GetComponent <Player>();
            player.shotType_Primary   = prim_shot;
            player.shotType_Secondary = seco_shot;

            AudioManager.Instance.bgm_as.clip   = AudioManager.Instance.bgm_standby;
            AudioManager.Instance.bgm_as.volume = 0;
            AudioManager.Instance.bgm_as.Play();
            AudioManager.Instance.AudioFadeIn(AudioManager.Instance.bgm_as, 0.5f);
        }

        if (!animated)
        {
            if (ControllSetting.GetKeyDown("Shot"))
            {
                AudioManager.Instance.se_as.PlayOneShot(AudioManager.Instance.se_select);
                StartCoroutine(GameStart());
            }
            else
            {
                float vert = Input.GetAxisRaw("Vertical");
                if (vert < 0.0f || vert > 0.0f)
                {
                    AudioManager.Instance.se_as.PlayOneShot(AudioManager.Instance.se_cursor);
                    StartCoroutine(SlideCursor());
                }
                else
                {
                    float hori = Input.GetAxisRaw("Horizontal");
                    if (hori < 0.0f || hori > 0.0f)
                    {
                        AudioManager.Instance.se_as.PlayOneShot(AudioManager.Instance.se_cursor);
                        if (hori < 0.0f)
                        {
                            ShotChange(-1);
                        }
                        else
                        {
                            ShotChange(1);
                        }
                        primary.GetComponent <Text>().text   = prim_shot.ToString();
                        secondary.GetComponent <Text>().text = seco_shot.ToString();

                        player.shotType_Primary   = prim_shot;
                        player.shotType_Secondary = seco_shot;
                    }
                }
            }
        }

        if (setting)
        {
            if (demoCT >= 0.5f)
            {
                player.ShotBullets_Demo(select_prim);
            }
            demoCT += Time.deltaTime;
            if (demoCT >= 1.5f)
            {
                demoCT = 0.0f;
            }
        }
    }
예제 #5
0
 private void OnGUI()
 {
     GUI.Label(new Rect(100, 100, 50, 50), shotType.ToString());
 }