Пример #1
0
 void Start()
 {
     podeAtacar   = true;
     uChan        = GameObject.FindWithTag("Player"); //achar o player
     uChanControl = uChan.GetComponent <uChanController>();
     naveMesh     = GetComponent <NavMeshAgent>();
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        path         = "Assets/UnityChan/Inventory/Images/gridIcon.png";
        theInventory = GetComponent <inventoryScript>();
        items        = GetComponent <itemsScript>();
        uChanControl = GetComponent <uChanController>();

        gridIndexValue = 0;
        indexNewItem   = -1;

        loadInventory();
    }
Пример #3
0
    void Start()
    {
        uChan        = GameObject.FindWithTag("Player"); //achar o player
        uChanControl = uChan.GetComponent <uChanController>();

        resetAngleFirstCam = true;
        uChanTrans         = gameObject.transform.parent;
        cameraMoveSpeed    = 120.0f;
        inputSensitivity   = 150.0f;
        rotX         = 0.0f;
        rot          = transform.localRotation.eulerAngles;
        rotX         = rot.x;
        clampAngleX1 = -24.5f;
        clampAngleX2 = 60.0f;
        invScript    = GetComponentInParent <inventoryScript>();
        //Cursor.lockState = CursorLockMode.Locked;
        //Cursor.visible = false;
    }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        itemList.Add("Cura", 0);
        path = "Item_Icons/";
        i    = 0;

        itemsName        = new string[] { "Cura", "bla", "blabla", "blablabla" };
        itemDesc         = new string[] { "Recupera vida.", "blablablabla", "blablablabla", "blablablabla" };
        itemPlayerAmount = new int[] { 0, 0, 0, 0 };
        itemTexture      = new Texture[itemsName.Length];

        uChanControl = GetComponent <uChanController>();

        foreach (string itemName in itemsName)
        {
            itemTexture[i] = Resources.Load <Texture>(path.Insert(path.Length, itemName));
            i++;
        }

        lanternTexture = Resources.Load <Texture>("Lantern_Icon/lantern");
    }
Пример #5
0
    // Use this for initialization
    void Start()
    {
        spawned = false;

        gridIndexValue         = -1;
        gridLineValue          = 5;
        maxIndexGrids          = grids.Length - 1;
        maxColumnGrid          = (grids.Length / 5) - 1;
        style                  = new GUIStyle();
        style.normal.textColor = Color.white;

        lanternGrid = new GUIContent();

        styleLife                  = new GUIStyle();
        styleLife.font             = (Font)Resources.Load("Fonts/BIONIC");
        styleLife.normal.textColor = Color.green;
        styleLife.alignment        = TextAnchor.LowerRight;
        windowPosition             = new Vector2(0, 0);

        addingNewItem = GetComponent <inventoryAddItem>();
        items         = GetComponent <itemsScript>();
        uChanControl  = GetComponent <uChanController>();
    }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     items         = GetComponent <itemsScript>();
     uChanControl  = GetComponent <uChanController>();
     addingNewItem = GetComponent <inventoryAddItem>();
 }