Пример #1
0
    // Use this for initialization
    void Start()
    {
        manager = gameObject.GetComponent<AudioManager>();
        gameManager = GameObject.Find("TrainManager").GetComponent<TrainManager>();
        hand = gameObject.GetComponentInChildren<TutorialHand>();
        tutorialCow = GameObject.Find("TutorialCow");

        tutorialCow.SetActive(false);

        if(GameObject.Find("SelectedTrain") != null)
        {
            SelectedTrain selectedTrain = GameObject.Find("SelectedTrain").GetComponent<SelectedTrain>();

            if (selectedTrain.showTutorial)
            {
                //Debug.Log("SHOWING TUTORIAL");
                StartCoroutine("runTutorial");
            }
            else
            {
                //Debug.Log("NOT SHOWING TUTORIAL");
                gameManager.startTrain();
                Destroy(this.gameObject);
            }
        }
        else
        {
            //Debug.Log("NOT SHOWING TUTORIAL - selected train not found");
            gameManager.startTrain();
            Destroy(this.gameObject);
        }
    }
Пример #2
0
 void grabBalloonTo(TutorialHand hand, DragableNumber num, NumberSlot to)
 {
     moveHandAction(hand, num);
     Actions.AddAction(new CallFunction(delegate() { hand.Grab(); }), true);
     moveHandAction(hand, to);
     Actions.AddAction(new CallFunction(delegate() { hand.IsGrabbing = false; }), true);
 }
Пример #3
0
        public override void Init()
        {
            Manager.FadeInSong(Assets.GameSong, true, 0.2f);
            Settings.USE_MULTIPLICATION = true;
            Settings.USE_ADDITION = false;
            Settings.USE_SUBTRACTION = false;

            AddCurtain();
            OpenCurtain();

            PlayerOne = new Player(Context, SkeletonPlayerAssignment.LeftSkeleton);
            PlayerTwo = new Player(Context, SkeletonPlayerAssignment.RightSkeleton);

            CurrentPlayer = PlayerOne;

            playerOneHand = new TutorialHand(PlayerOne, Microsoft.Kinect.JointType.HandRight);
            playerTwoHand = new TutorialHand(PlayerTwo, Microsoft.Kinect.JointType.HandRight);

            playerOneHand.Position = new Vector2(500, 300);
            playerTwoHand.Position = new Vector2(900, 300);

            AddEntity(playerOneHand);
            AddEntity(playerTwoHand);

            PlayerOne.RightHand = playerOneHand;
            PlayerTwo.RightHand = playerTwoHand;

            PlayerOneClock = new Clock(20, 20, 90);
            PlayerTwoClock = new Clock(MainGame.Width - 130, 20, 90);

            PlayerTwoClock.Paused = true;

            AddEntity(PlayerOneClock);
            AddEntity(PlayerTwoClock);

            Coroutines.Start(LoadNumbersFromFile());

            AddInput();

            if (!Configuration.GRABBING_ENABLED) {
                AddEntity(new Scissors(120, MainGame.Height - 350, Scissors.ScissorPosition.Left));
                AddEntity(new Scissors(MainGame.Width - 120, MainGame.Height - 350, Scissors.ScissorPosition.Right));
            }

            base.Init();
        }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        Random.seed = (int) (System.DateTime.UtcNow.Ticks % int.MaxValue);

        // Find assocciated minigame
        minigame = GetComponent<Minigame>();
        Sherlock.Instance.SetBubblePosition(Sherlock.side.DOWN);

        interestOptionsRoot.SetActive(false);
        hiddenObjectsRoot.SetActive(false);

        tutorialHand = GameObject.Find ("TutorialHand").GetComponent<TutorialHand>();

        currentLevel = -1;
        ShuffleCharacters();
        ResetDisplayObjects();

        Sherlock.Instance.HideDialogue();

        if(!minigame.isStandalone()) //if the minigame is part of the story, not free play mode
        {
            Destroy(tutorialOptions);
            if(showTutorial)
            {
                // Show the instructions of the minigame
                if (minigame != null && minigame.StartConversation() == false)
                {
                    Debug.Log("To learn other peoples’ interests, use your eyes to find clues about them.");
                }
                StartCoroutine("startTutorial");
            }
            else
            {
                // Show the instructions of the minigame
                if (minigame != null && minigame.StartConversation() == false)
                {
                    Debug.Log("To learn other peoples’ interests, use your eyes to find clues about them.");
                }
                Invoke ("InitializeFirstLevel", minigame.GetCurrentDialogueDuration());
            }
        }
    }
Пример #5
0
 // Use this for initialization
 void Start()
 {
     canvas = GameObject.Find("Canvas").GetComponent<Drawing>();
     manager = gameObject.GetComponent<AudioManager>();
     hand = gameObject.GetComponentInChildren<TutorialHand>();
     canvas.canDraw = false;
     foreach(BoxCollider button in PaintUI.GetComponentsInChildren<BoxCollider>())
     {
         if(button.gameObject.transform.parent.name != "MarkerMenu" && button.gameObject.name != "Markers")
             button.enabled = false;
     }
 }
Пример #6
0
 void OnEnable()
 {
     hand = (TutorialHand)target;
 }
Пример #7
0
        public override void Init()
        {
            base.Init();

            Manager.FadeInSong(Assets.GameSong, true, 0.2f);

            AddCurtain();
            OpenCurtain();

            PlayerOne = new Player(Context, SkeletonPlayerAssignment.FirstSkeleton);

            hand = new TutorialHand(PlayerOne, Microsoft.Kinect.JointType.HandRight);

            PlayerOne.RightHand = hand;

            AddEntity(hand);

            hand.Position = new Point(500, 300);

            MainClock = new Clock(20, 20, 90);
            MainClock.Paused = true;

            AddEntity(MainClock);

            Score = new ScoreSign(MainGame.Width - 190, 25);
            Score.Value = 0;
            AddEntity(Score);

            Coroutines.Start(LoadNumbersFromFile());

            AddInput();

            if (!Configuration.GRABBING_ENABLED) {
                AddEntity(new Scissors(120, MainGame.Height - 350, Scissors.ScissorPosition.Left));
                AddEntity(new Scissors(MainGame.Width - 120, MainGame.Height - 350, Scissors.ScissorPosition.Right));
            }
        }
Пример #8
0
 private void Awake()
 {
     instance = this;
 }
Пример #9
0
    // Use this for initialization
    void Start()
    {
        manager = gameObject.GetComponent<AudioManager>();
        hand = gameObject.GetComponentInChildren<TutorialHand>();
        //StartCoroutine("runTutorial");
        engineColor = engine.GetComponent<UISprite>().color;

        foreach(BoxCollider car in trainCars.GetComponentsInChildren<BoxCollider>())
        {
            car.enabled = false;
        }
    }