Esempio n. 1
0
    // Use this for initialization
    void Awake()
    {
        score = 0;

        //配列の初期化
        for (int i = 0; i < board.GetLength(0); i++)
        {
            for (int j = 0; j < board.GetLength(1); j++)
            {
                board[i, j]     = -1;
                board_num[i, j] = -1;
            }
        }

        //初期用配列設定
        board[0, 0]     = maxDiceId;
        board_num[0, 0] = 1;

        DiceBase = (GameObject)Resources.Load("Dice");
        Dice     = GameObject.Find("Dice");
        dices.Add(Dice);  //リストにオブジェクトを追加
        Aqui = GameObject.Find("Aqui");
        objAquiController = Aqui.GetComponent <AquiController>();
        objDiceController = Dice.GetComponent <DiceController>();

        if (gameType == 3)
        {
            board[0, 0]     = -1;
            board_num[0, 0] = -1;
            maxDiceId       = 0;
            dices.Clear();
            Destroy(Dice);
        }

        StatusText    = GameObject.Find("StatusText");
        objStatusText = StatusText.GetComponent <StatusTextController>();
        ScreenText    = GameObject.Find("ScreenText");
        objScreenText = ScreenText.GetComponent <ScreenTextController>();

        gobjOGController = GameObject.Find("OnlineGameController");



        //BGM
        if (gameType != 2)
        {
            BgmManager.Instance.Play((stage + 1).ToString()); //BGM
        }
        else
        {
            BgmManager.Instance.Play("tutorial"); //BGM
        }

        //AudioSourceコンポーネントを取得し、変数に格納
        AudioSource[] audioSources = GetComponents <AudioSource>();
        sound_one     = audioSources[0];
        sound_levelup = audioSources[1];
        sound_vanish  = audioSources[2];
    }
Esempio n. 2
0
 private void RespondToText(string text)
 {
     foreach (Command command in commands)
     {
         if (command.Execute(text))
         {
             StatusTextController.UpdateText(command.successMessage.ToUpper());
             return;
         }
     }
     StatusTextController.UpdateText("ERR // COMMANDE INVALIDE; CONSULTEZ LE MANUEL");
 }
Esempio n. 3
0
        public void Initialize(ImageRegionSelectionControl control, SystemManagers managers,
                               WireframeEditControls wireframeControl, WireframeEditControlsViewModel wireframeEditControlsViewModel)
        {
            addCursor = new System.Windows.Forms.Cursor(this.GetType(), "Content.AddCursor.cur");

            mManagers = managers;
            mManagers.Renderer.SamplerState = SamplerState.PointClamp;

            mControl = control;

            keyboard = new Keyboard();
            keyboard.Initialize(control);

            mManagers.Renderer.Camera.CameraCenterOnScreen = CameraCenterOnScreen.TopLeft;

            mWireframeControl = wireframeControl;

            mControl.RegionChanged += new EventHandler(HandleRegionChanged);

            mControl.MouseWheelZoom     += new EventHandler(HandleMouseWheelZoom);
            mControl.AvailableZoomLevels = mWireframeControl.AvailableZoomLevels;

            mControl.XnaUpdate += new Action(HandleXnaUpdate);
            mControl.Panning   += HandlePanning;

            mSpriteOutline = new LineRectangle(managers);
            managers.ShapeManager.Add(mSpriteOutline);
            mSpriteOutline.Visible = false;
            mSpriteOutline.Color   = OutlineColor;

            selectionPreviewRectangle = new LineRectangle(managers);
            managers.ShapeManager.Add(selectionPreviewRectangle);
            selectionPreviewRectangle.Visible = false;
            selectionPreviewRectangle.Color   = MagicWandPreviewColor;
            // Move them up one Z to put them above the sprites:
            selectionPreviewRectangle.Z = 1;

            mLineGrid = new LineGrid(managers);
            managers.ShapeManager.Add(mLineGrid);
            mLineGrid.Visible = false;
            mLineGrid.Color   = OutlineColor;

            mControl.Click += new EventHandler(HandleClick);

            mStatusText = new StatusTextController(managers);
            mControl_XnaInitialize();

            WireframeEditControlsViewModel = wireframeEditControlsViewModel;
            WireframeEditControlsViewModel.PropertyChanged += HandleWireframePropertyChanged;
        }
Esempio n. 4
0
        public void Initialize(ImageRegionSelectionControl control, SystemManagers managers, WireframeEditControls wireframeControl)
        {
            mManagers = managers;
            mManagers.Renderer.SamplerState = SamplerState.PointClamp;

            mControl = control;

            keyboard = new Keyboard();
            keyboard.Initialize(control);

            mManagers.Renderer.Camera.CameraCenterOnScreen = CameraCenterOnScreen.TopLeft;

            mWireframeControl = wireframeControl;
            mWireframeControl.WandSelectionChanged += ReactToMagicWandChange;

            mControl.RegionChanged += new EventHandler(HandleRegionChanged);

            mControl.MouseWheelZoom     += new EventHandler(HandleMouseWheelZoom);
            mControl.AvailableZoomLevels = mWireframeControl.AvailableZoomLevels;

            mControl.XnaUpdate += new Action(HandleXnaUpdate);
            mControl.Panning   += HandlePanning;

            mSpriteOutline = new LineRectangle(managers);
            managers.ShapeManager.Add(mSpriteOutline);
            mSpriteOutline.Visible = false;
            mSpriteOutline.Color   = OutlineColor;

            mLineGrid = new LineGrid(managers);
            managers.ShapeManager.Add(mLineGrid);
            mLineGrid.Visible = false;
            mLineGrid.Color   = OutlineColor;

            mControl.Click += new EventHandler(HandleClick);

            mStatusText = new StatusTextController(managers);
            mControl_XnaInitialize();
        }