Exemple #1
0
    //NORMAL CAMERA POSITION IN UNITY: 0, 2.8f, -7
    // Use this for initialization
    void Start()
    {
        //Blackscreen on startup
        mask = GetComponent <Camera>().cullingMask;
        GetComponent <Camera>().cullingMask = 0;
        GetComponent <Camera>().clearFlags  = CameraClearFlags.Depth;
        Candle  = GameObject.Find("CandleInteraction").GetComponent <CandleInteraction>();
        taverne = GameObject.Find("Tavern").GetComponent <taverne>();

        //borders defined by normal camera-position
        borderx  = transform.position.x;
        bordery  = transform.position.y;
        borderz  = transform.position.z + 4;
        camSpeed = 1.2f;
        current  = 0;
        prev     = false;
        next     = false;

        //"Flags"
        director = false;
        waiting  = false;
        darting  = false;
        std      = false;
        blocked  = false;

        //posotions
        standard = new GameObject("StandardPos");
        standard.transform.Translate(0, 2.7f, -8);
        front = new GameObject("FrontPos");
        front.transform.Translate(0, 1.8f, -2.5f);
        leftfront = new GameObject("LeftFrontPos");
        leftfront.transform.Translate(-4.5f, 2, -0.05f);
        rightfront = new GameObject("RightFrontPos");
        rightfront.transform.Translate(4.5f, 2, -0.05f);
        leftrear = new GameObject("LeftRearPos");
        leftrear.transform.Translate(-4.5f, 4, -7);
        rightrear = new GameObject("RightRearPos");
        rightrear.transform.Translate(4.5f, 4, -7);
        Positions = new GameObject[] { standard, front, leftfront, rightfront, rightrear, leftrear };

        //standard fixpoint for bard-mode (maybe later changed for free-roam)
        fix = new Vector3(0, 2.7f, 6.15f);
        //transform.Translate(0,2.7f,-8);

        //activate camera after startup
        StartCoroutine(WaitForIt());
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        interaction = GameObject.Find("InteractionText");
        text        = interaction.GetComponent <Text>();

        cs = GameObject.Find("CandleSpawner").GetComponent <CandleSpawner>();

        ci = GameObject.Find("CandleInteraction").GetComponent <CandleInteraction>();

        index      = (Int32.Parse(gameObject.name.Substring(gameObject.name.Length - 1))) - 1;
        isLit      = true;
        prev       = false;
        lastChange = false;
        isHidden   = false;
        active     = false;
        tempText   = "";
        //WaitForBard();
    }