public void Form2Test()
        {
            // Form1 form = new Form1();
            ControlGame cg = new ControlGame();
            String      h  = cg.checkArray("Peter 10 Gosy 120", "Katie");

            Assert.AreNotEqual(h, "130");
        }
        public void Form1Test()
        {
            // Form1 form = new Form1();
            ControlGame cg = new ControlGame();
            String      h  = cg.checkArray("john 10 Katie 120", "Katie");

            Assert.AreEqual(h, "130");
        }
Exemple #3
0
    // Update is called once per frame
    void Update()
    {
        timeElapsed += Time.deltaTime;

        if (timeElapsed >= scrollTime)
        {
            pictureIndex++;

            if (pictureIndex == montageFigures.Length)
            {
                GameObject  gameControl = GameObject.Find("GameControl");
                ControlGame control     = gameControl.GetComponent <ControlGame>();
                pictureIndex = 0;
                control.Reset();
            }
            timeElapsed = 0.0f;
        }

        GameObject     figure = montageFigures[pictureIndex];
        NecessaryItems explorationListContainer = figure.GetComponent <NecessaryItems>();

        GameObject[] items = explorationListContainer.itemList;
        for (int i = pictureIndex; i <= montageFigures.Length; i++)
        {
            pictureIndex = i;

            if (i == montageFigures.Length)
            {
                GameObject  gameControl = GameObject.Find("GameControl");
                ControlGame control     = gameControl.GetComponent <ControlGame>();
                pictureIndex = 0;
                control.Reset();
                break;
            }

            figure = montageFigures[i];
            explorationListContainer = figure.GetComponent <NecessaryItems>();
            items = explorationListContainer.itemList;

            if (AnythingExplored(items))
            {
                break;
            }
        }

        for (int i = 0; i < montageFigures.Length; i++)
        {
            if (i == pictureIndex)
            {
                montageFigures[i].SetActive(true);
            }
            else
            {
                montageFigures[i].SetActive(false);
            }
        }
    }
    void Awake()
    {
        Debug.Log("Control");

        stateGame = StateGame.IDLE;

        if (instance == null)
        {
            instance = this;
        }
        DontDestroyOnLoad(gameObject);
    }
Exemple #5
0
    public void Init()
    {
        engine = GetComponent <CharacterInputController>();
        engine.refreshDitance = new CharacterInputController.RefreshDistance(RefreshDistance);
        ui_controller         = GetComponent <CharacterUIController>();
        controlGame           = GameObject.Find("GameControl").GetComponent <ControlGame>();
        startPos = transform.position;

        MapControl mapControl = GameObject.Find("MapControl").GetComponent <MapControl>();

        createPlatform = mapControl.CreatePlatform;
    }
Exemple #6
0
 public Service(string connectionBaseStr, int maxDescriptionSize, int maxNameSize, int minValidYear)
 {
     controlPublisher = new ControlPublisher(connectionBaseStr, maxNameSize);
     controlGenre     = new ControlGenre(connectionBaseStr, maxDescriptionSize, maxNameSize);
     controlGame      = new ControlGame(connectionBaseStr, maxNameSize, minValidYear);
 }
Exemple #7
0
 void Start()
 {
     A1               = GameObject.FindObjectOfType <ControlGame>();
     ObjectGoal       = A1.Goal();
     position_initial = transform.position;
 }
Exemple #8
0
 public Service(int maxDescriptionSize, int maxNameSize, int minValidYear)
 {
     controlPublisher = new ControlPublisher(maxNameSize);
     controlGenre     = new ControlGenre(maxDescriptionSize, maxNameSize);
     controlGame      = new ControlGame(maxNameSize, minValidYear);
 }