Beispiel #1
0
    private IEnumerator Start()
    {
        if (PanzeeManager.Instance.IsSpawnable)
        {
            Destroy(yangkiru.gameObject);
            yield break;
        }
        yield return(null);

        PanzeeManager.Instance.AddPanzee("yangkiru", yangkiru);
        yangkiru.SetText("팬치들은 !퇴장 을 입력해 포기 할 수 있어");
        yield return(wait3);

        yangkiru.SetText("!퇴장 뒤에 입력한 말을 유언으로 남길 수 있어");
        yield return(wait3);

        yangkiru.SetText("형 일단 만들긴 했는데");
        yield return(wait3);

        yangkiru.SetText("재밌게 해!");
        yield return(wait3);

        yangkiru.SetText("형 이제 난 가볼게..");
        yield return(wait3);

        yangkiru.Suicide("너무 힘들다.. 난 좀 쉴께..");
        PanzeeManager.Instance.SetSpawnable(true);
    }
Beispiel #2
0
    public void HandleCommand(TwitchCommandData data)
    {
        Panzee panzee = null;

        PanzeeManager.Instance.panzeeDict.TryGetValue(data.Author, out panzee);
        if (panzee != null)
        {
            string lastWord = data.Message.Substring(0 + (TwitchCommands.CmdPrefix + TwitchCommands.CmdSuicide).Length).TrimStart(' ');
            panzee.Suicide(lastWord);
        }
    }
Beispiel #3
0
    public void HandleCommand(TwitchCommandData data)
    {
        if (!PanzeeManager.Instance.IsSpawnable)
        {
            return;
        }
        Panzee panzee = null;

        PanzeeManager.Instance.panzeeDict.TryGetValue(data.Author, out panzee);
        if (data.Author.Equals(PanzeeManager.devName))
        {
            if (panzee == null)
            {
                PanzeeManager.Instance.SpawnPanzee(data.Author, "!입장");
            }
            return;
        }
        if (panzee != null)
        {
            string lastWord = data.Message.Substring(0 + (TwitchCommands.CmdPrefix + TwitchCommands.CmdSuicide).Length).TrimStart(' ');
            panzee.Suicide("!입장을 쳐서 밴당했습니다");
        }
        PanzeeManager.Instance.banDict.Add(data.Author, true);
    }
Beispiel #4
0
    void Update()
    {
        if (tf.position.y <= -20)
        {
            for (int i = 0; i < PanzeeManager.Instance.panzeeArray.Length; i++)
            {
                Panzee panzee = PanzeeManager.Instance.panzeeArray[i];
                if (panzee != null)
                {
                    panzee.Suicide(panzee.text.text);
                }
            }
            SceneManager.LoadScene("Loading");
        }
        if (rb.velocity.x > 0.5f)
        {
            tf.localScale        = new Vector3(scale, scale, 1);
            keyButton.localScale = tf.localScale;
        }
        else if (rb.velocity.x < -0.5f)
        {
            tf.localScale        = new Vector3(-scale, scale, 1);
            keyButton.localScale = tf.localScale;
        }

        if (Input.GetKeyDown(KeyCode.BackQuote))
        {
            Select(0);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            Select(1);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            Select(2);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            Select(3);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha4))
        {
            Select(4);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha5))
        {
            Select(5);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha6))
        {
            Select(6);
        }

        if (Input.GetKeyDown(KeyCode.Space))   //호치
        {
            if (selected != null && !selected.Equals(this))
            {
                Panzee panzee = (selected as MonoBehaviour).GetComponent <Panzee>();
                if (panzee != null)
                {
                    animator.SetTrigger("attack");
                }
            }
        }

        if (Input.GetKeyDown(KeyCode.LeftShift))          //연결
        {
            if (selected != null && !selected.Equals(this))
            {
                Panzee panzee = (selected as MonoBehaviour).GetComponent <Panzee>();

                if (!panzee.joint.enabled && insidePanzee.Contains(panzee))
                {
                    panzee.joint.enabled = true;

                    panzee.neckLine.gameObject.SetActive(true);
                    if (panzee.joint.connectedBody == null)
                    {
                        panzee.joint.connectedBody = rb;
                    }
                }
                else
                {
                    panzee.joint.enabled = false;
                    panzee.neckLine.gameObject.SetActive(false);
                }
            }
        }

        if (Input.GetKeyDown(KeyCode.R))
        {
            SceneManager.LoadScene("Loading");
        }
    }