Ejemplo n.º 1
0
    public void StartStep(TutorialScript ts, Player player)
    {
        this.ts = ts;
        player.InputController.EnableMoveInput     = false;
        player.InputController.EnableTurningAround = false;
        player.InputController.EnableShootingInput = false;
        player.InputController.CameraRotation      = Vector2.zero;
        guis.EnableTutorialOKButton(true);
        GameDialog dialog = GameUIScript.GetGameUIScript().GetDialog();

        dialog.SetText("\nCONGRATS! YOU'VE COMPLETED THE CALL OF MINI BOOTCAMP! READY TO GO INTO BATTLE?");
        dialog.Show();
    }
Ejemplo n.º 2
0
    public void StartStep(TutorialScript ts, Player player)
    {
        this.ts = ts;
        player.InputController.EnableMoveInput     = false;
        player.InputController.EnableTurningAround = false;
        player.InputController.EnableShootingInput = false;
        player.InputController.CameraRotation      = Vector2.zero;
        guis.EnableTutorialOKButton(true);

        GameDialog dialog = GameUIScript.GetGameUIScript().GetDialog();

        dialog.SetText("\nTAP AND SLIDE ON THE SCREEN TO ADJUST YOUR LINE OF SIGHT, THEN AIM AT THE BOX IN FRONT OF YOU.");
        dialog.Show();
    }
Ejemplo n.º 3
0
    public void StartStep(TutorialScript ts, Player player)
    {
        this.ts = ts;
        player.InputController.EnableMoveInput     = false;
        player.InputController.EnableTurningAround = false;
        player.InputController.EnableShootingInput = false;
        player.InputController.CameraRotation      = Vector2.zero;
        guis.EnableTutorialOKButton(true);

        GameDialog dialog = GameUIScript.GetGameUIScript().GetDialog();

        dialog.SetText("\nOK, NOW YOU'RE READY TO TRY USING YOUR WEAPON. USE THE RIGHT JOYSTICK TO AIM AT AND SHOOT THE BOX IN FRONT OF YOU.");
        dialog.Show();
    }
Ejemplo n.º 4
0
    public void StartStep(TutorialScript ts, Player player)
    {
        this.ts = ts;
        player.InputController.EnableMoveInput     = false;
        player.InputController.EnableTurningAround = false;
        player.InputController.EnableShootingInput = false;
        player.InputController.CameraRotation      = Vector2.zero;
        guis.EnableTutorialOKButton(true);

        GameDialog dialog = GameUIScript.GetGameUIScript().GetDialog();

        dialog.SetText("\nALRIGHT, NOW THAT YOU'VE GOT DOWN THE BASICS, TRY SHOOTING THE ZOMBIE IN FRONT OF YOU.");
        dialog.Show();
    }
Ejemplo n.º 5
0
    public void StartStep(TutorialScript ts, Player player)
    {
        this.ts = ts;
        player.InputController.EnableMoveInput     = false;
        player.InputController.EnableTurningAround = false;
        player.InputController.EnableShootingInput = false;
        player.InputController.CameraRotation      = Vector2.zero;


        GameObject halo = GameObject.Instantiate(GameApp.GetInstance().GetResourceConfig().halo, player.GetTransform().TransformPoint(Vector3.forward * 15.0f), Quaternion.Euler(90, 0, 0)) as GameObject;

        halo.name = "Halo";

        GameDialog dialog = GameUIScript.GetGameUIScript().GetDialog();

        dialog.SetText("\nUSE THE LEFT JOYSTICK TO WALK AROUND. GO AHEAD AND WALK INTO THE CIRCLE OF PULSATING LIGHT.");
        dialog.Show();

        //dialogText.Rect = uiPos.DesignerText;
    }
Ejemplo n.º 6
0
    void Awake()
    {
        if (GameObject.Find("ResourceConfig") == null)
        {
            GameObject resourceConfig = Object.Instantiate(Resources.Load("ResourceConfig")) as GameObject;
            resourceConfig.name = "ResourceConfig";
            DontDestroyOnLoad(resourceConfig);
        }


        UIResourceMgr.GetInstance().LoadAllGameUIMaterials();
        gameuiMaterial = UIResourceMgr.GetInstance().GetMaterial("GameUI");

        if (Application.loadedLevelName == SceneName.SCENE_TUTORIAL)
        {
            dialog = new GameDialog(UIDialog.DialogMode.TAP_TO_DISMISS);
            dialog.SetText(ConstData.FONT_NAME2, "", ColorName.fontColor_darkorange);
            dialog.SetDialogEventHandler(this);
        }
    }
Ejemplo n.º 7
0
    // Use this for initialization
    void Start()
    {
        ResolutionConstant.R = ((float)Screen.width) / 960f;
        UIResourceMgr.GetInstance().LoadStartMenuUIMaterials();    //! 加载开始菜单需要的材质


        uiPos = new StartMenuUIPosition();
        //texPos = new StartMenuTexturePosition();

        //! UIManager
        m_UIManager = gameObject.AddComponent <UIManager>() as UIManager;
        m_UIManager.SetParameter(8, 1, false);
        m_UIManager.SetUIHandler(this);                     //! HandleEvent
        m_UIManager.CLEAR = true;

        startMenuMaterial = UIResourceMgr.GetInstance().GetMaterial("StartMenu");      //! StartMenu 材质
        //startMenu2Material = UIResourceMgr.GetInstance().GetMaterial("StartMenu2");
        Material buttonsMaterial = UIResourceMgr.GetInstance().GetMaterial("Buttons"); //! Button材质

        background = new UIImage();
        background.SetTexture(startMenuMaterial, StartMenuTexturePosition.Background, AutoRect.AutoSize(StartMenuTexturePosition.Background));
        background.Rect = AutoRect.AutoPos(uiPos.Background);


        startButton = new UITextButton();
        startButton.SetTexture(UIButtonBase.State.Normal, buttonsMaterial,

                               ButtonsTexturePosition.ButtonNormal, AutoRect.AutoSize(ButtonsTexturePosition.MiddleSizeButton));
        startButton.SetTexture(UIButtonBase.State.Pressed, buttonsMaterial,

                               ButtonsTexturePosition.ButtonPressed, AutoRect.AutoSize(ButtonsTexturePosition.MiddleSizeButton));

        startButton.Rect = AutoRect.AutoPos(uiPos.StartButton);
        startButton.SetText(ConstData.FONT_NAME1, " NEW GAME", ColorName.fontColor_orange);

        continueButton = new UITextButton();
        continueButton.SetTexture(UIButtonBase.State.Normal, buttonsMaterial,

                                  ButtonsTexturePosition.ButtonNormal, AutoRect.AutoSize(ButtonsTexturePosition.MiddleSizeButton));
        continueButton.SetTexture(UIButtonBase.State.Pressed, buttonsMaterial,

                                  ButtonsTexturePosition.ButtonPressed, AutoRect.AutoSize(ButtonsTexturePosition.MiddleSizeButton));

        continueButton.Rect = AutoRect.AutoPos(uiPos.ContinueButton);

        continueButton.SetText(ConstData.FONT_NAME1, " CONTINUE", ColorName.fontColor_orange);



        gameDialog = new GameDialog(UIDialog.DialogMode.YES_OR_NO);
        gameDialog.SetText(ConstData.FONT_NAME2, "\n\nAre You Sure You Want To Erase Your Progress And Start A New Game?", ColorName.fontColor_darkorange);
        gameDialog.SetDialogEventHandler(this);


        m_UIManager.Add(background);
        m_UIManager.Add(startButton);
        m_UIManager.Add(continueButton);

        m_UIManager.Add(gameDialog);

        GameApp.GetInstance().Init();
        GameCenterInterface.Login();

        string path = Application.dataPath + "/../../Documents/";

        if (File.Exists(path + "MySavedGame.game"))
        {
        }
        else
        {
            continueButton.Visible = false;
            continueButton.Enable  = false;
        }

        FlurryTAd.ShowTAd(true);
    }