Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- class przedmiot
- {
- public string nazwa = "";
- float waga = 10.0f;
- void uzyj()
- {
- }
- }
- public class NewScript : MonoBehaviour
- {
- void funkcja1(int x, int y)
- {
- return x + y;
- }
- // Use this for initialization
- void Start ()
- {
- przedmiot krzeslo = new przedmiot();
- krzeslo.nazwa = "krzeslo";
- krzeslo.uzyj();
- przedmiot stol = new przedmiot();
- stol.nazwa = "stol";
- stol.uzyj();
- stol = krzeslo;
- krzeslo.nazwa = "innekrzeslo";
- Debug.Log(stol.nazwa);
- // przedmiot lodowka;
- // lodowka.nazwa = "costam";
- krzeslo = null
- int suma = funkcja1 (5, 10);
- funkcja1 (15, 20);
- int zmienna1 = 0;
- int zmienna2 = 1;
- funkcja1 (zmienna1, zmienna2);
- int liczba = 10;
- float liczbaulamkowa = 2.5f;
- double liczbaulamkowa2 = 2.5;
- string tekst = "Jakis tekst";
- bool flaga = true;
- char c = '5';
- // liczbaulamkowa = liczba;
- liczba = (int)liczbaulamkowa;
- string tekst2 = "200";
- int liczba2 = int.Parse(tekst2);
- string tekst3 = liczba2.ToString();
- int liczba5 = 10;
- int liczba6 = 20;
- liczba5 = liczba6;
- liczba5 = liczba5 + liczba6;
- liczba5 = liczba5 * liczba6;
- liczba5 = 1 - 2;
- liczba5 = 10 / 3;
- float liczbaulamkowa3 = 10.0f / 3.0f;
- 5 = liczba5;
- bool wynik = liczba5 == 1;
- wynik = liczba5 !=1;
- wynik = liczba5 > 0; // < <= >=
- wynik = !flaga;
- wynik = !(liczba5 == liczba6);
- if (liczba5 > 0)
- {
- Debug.Log("prawda);\t
- }
- else
- {
- Debug.Log("falsz")
- }
- Debug.Log(liczbaulamkowa3);
- string nazwa = "jakasnazwa";
- }
- // Update is called once per frame
- void Update () {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement