Esempio n. 1
0
    public bool isAction; // 대화 중인지 아닌지 판별

    // Update is called once per frame
    public void Action(GameObject scanObj) // 대화 시스템 활성화 함수
    {
        scanNpc = scanObj;
        objData objData = scanNpc.GetComponent <objData>();

        Talk(objData.id, objData.isNpc);
        talkPanel.SetActive(isAction);
    }
Esempio n. 2
0
    // Update is called once per frame
    public void Action(GameObject scanObj)
    {
        scanObject = scanObj;
        objData ObjData = scanObject.GetComponent <objData>();

        Talk(ObjData.id, ObjData.isNpc);

        talkPanel.SetActive(isAction);
    }
Esempio n. 3
0
    public void callingSaveAddedObject(string commandType, string objName, GameObject objInfo, Vector3 position)
    {
        if (actionListForRedo.Count != 0)
        {
            Stack <objData> special   = new Stack <objData>();
            Stack <objData> tempo     = new Stack <objData>();
            bool            isPresent = false;
            do
            {
                if (actionListForRedo.Peek() == "delete")
                {
                    special.Push(theRedoObjects.Peek());
                    do
                    {
                        string tempName = special.Peek().name;
                        if (theObjects.Peek().name == tempName || theObjects.Peek().name == tempName.Remove(tempName.Length - 8, 8))
                        {
                            isPresent = true;
                        }
                        else
                        {
                            tempo.Push(theObjects.Peek());
                            theObjects.Pop();
                        }
                    } while (theObjects.Count > 0 && isPresent != true);

                    do
                    {
                        theObjects.Push(tempo.Peek());
                        tempo.Pop();
                    } while (tempo.Count > 0);

                    if (isPresent == true)
                    {
                        theRedoObjects.Pop();
                        actionListForRedo.Pop();
                    }
                    else
                    {
                        theRedoObjects.Peek().typeOfObject.GetComponent <highlightObjects>().trueDelete(theRedoObjects.Peek().typeOfObject);
                        actionListForRedo.Pop();
                        theRedoObjects.Pop();
                    }
                }
                else if (actionListForRedo.Peek() == "moved")
                {
                    theRedoObjects.Pop();
                    actionListForRedo.Pop();
                }
                else
                {
                    theRedoObjects.Peek().typeOfObject.GetComponent <highlightObjects>().trueDelete(theRedoObjects.Peek().typeOfObject);
                    actionListForRedo.Pop();
                    theRedoObjects.Pop();
                }
            } while (actionListForRedo.Count != 0);
        }
        //Debug.Log("Was Called");
        //This took longer then I wish it did to finally work, no idea why
        objData temp = new objData();

        temp.name                  = objName;
        temp.typeOfObject          = objInfo;
        temp.positionOrTranslation = position;
        //temp.realTranslation =
        actionList.Push(commandType);
        theObjects.Push(temp);
        //Debug.Log("Was Called");
    }