示例#1
0
    /********************************/
    /******** UNITY HANDLERS ********/
    /********************************/

    void Awake()
    {
        if (SystemInfo.deviceModel == "Motorola Moto 360")
        {
            RoundScreenMode();
        }

        HOTween.Init(true, true, true);
        HOTween.EnableOverwriteManager();

        Inst      = this;
        HighScore = PlayerPrefs.GetInt("HighScore", 0);

        if (Platform == Platform.Web)
        {
            Application.ExternalCall("SetHighScore", HighScore);
        }

        ECurrentView = View.Game;
        StartCoroutine(StartGameIE());

#if UNITY_IPHONE
        GameCenterSingleton.Instance.Initialize();
#endif

        if (Platform == Platform.Phone)
        {
            leaderboardsButton.Clicked += HandleLeaderboardsButtonClicked;
        }
    }
示例#2
0
    public Main()
    {
        HOTween.Init(false, false, true);
        HOTween.EnableOverwriteManager();

        SetupContainer();
        StartGame();
    }
示例#3
0
        public bool overwriteShowLog = false; //if true, overwrite will spam the log when it is overwriting a tween.

        protected override void OnInstanceInit()
        {
            HOTween.Init(true, showCount, overwriteEnable);

            if (overwriteEnable)
            {
                HOTween.EnableOverwriteManager(overwriteShowLog);
            }
        }
示例#4
0
    // public GUISkin unselectedSkin;
    // public GUISkin selectedSkin;
    // private GUIStyle hexagonFont = new GUIStyle();
    // private GUIStyle leftAlign = new GUIStyle();
    // private GUIStyle rightAlign = new GUIStyle();

    // public enum MenuState
    // {
    //  MAIN,
    //  LEVELS,
    //  GAME,
    //  GAMEOVER
    // };
    // public static MenuState menuPosition = MenuState.MAIN;

    // public enum Button
    // {
    //  NONE,
    //  START,
    //  RESTART,
    //  BACK,
    //  EXIT
    // };
    // [SerializeField] private Button buttonSelected = Button.NONE;
    // private dRect3D startButton = new dRect3D(new Rect(416, 260, 100, 55), new Rect(66, 260, 100, 55));
    // private dRect3D exitButton = new dRect3D(new Rect(634, 260, 100, 55), new Rect(285, 260, 100, 55));
    // private dRect3D restartButton = new dRect3D(new Rect(401, 260, 125, 55), new Rect(41, 260, 125, 55));
    // private dRect3D timeLabel = new dRect3D(new Rect(410, 80, 100, 55), new Rect(60, 80, 100, 55));
    // private dRect3D highScoreLabel = new dRect3D(new Rect(645, 80, 100, 55), new Rect(295, 80, 100, 55));
    // private int timeButtonSelected = 0;
    // private readonly int timeToSelectButton = 60;
    // public int cursorPosition = 200;

    // [SerializeField] private Texture cursor = null;
    // private float originalWidth = 800;
    // private float originalHeight = 480;
    // private Vector3 scale;
    // private Vector3 translate;
    // Rect rect;
    // Vector2 pivot;

    // Use this for initialization
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        HOTween.Init(false, false, true);
        HOTween.EnableOverwriteManager();

        gui = GameObject.Find("GUI").GetComponent <SBSgui>();

        // hexagonFont.fontSize = 27;
        // hexagonFont.normal.textColor = Color.white;
        // leftAlign.alignment = TextAnchor.MiddleLeft;
        // leftAlign.normal.textColor = Color.white;
        // leftAlign.fontSize = 12;
        // rightAlign.alignment = TextAnchor.MiddleRight;
        // rightAlign.normal.textColor = Color.white;
        // rightAlign.fontSize = 12;
    }
示例#5
0
    //execute this before any other Start() or Update() function
    //since we need the data of all paths before we call them
    void Awake()
    {
        //for each child/path of this gameobject, add path to dictionary
        foreach (Transform path in transform)
        {
            AddPath(path.gameObject);
        }

        //http://www.holoville.com/hotween/documentation.html#hotweeninit
        //initialize HOTween immediately instead than having it being
        //automatically initialized when the first Tweener is created.
        HOTween.Init(true, true, true);
        //HOTween's OverwriteManager works in the background, and automatically
        //checks if a running tween needs to be overwritten by a newly started one.
        HOTween.EnableOverwriteManager();
        //If true, shows the eventual paths in use by PlugVector3Path while playing
        //inside Unity's Editor (and if the Editor's Gizmos button is on).
        HOTween.showPathGizmos = true;
    }
示例#6
0
        //execute this before any other Start() or Update() function
        //since we need the data of all paths before we call them
        void Awake()
        {
            //try to add each child to the waypoint manager
            foreach (Transform path in transform)
            {
                AddPath(path.gameObject);
            }

            //http://www.holoville.com/hotween/documentation.html#hotweeninit
            //initialize HOTween immediately instead than having it being
            //automatically initialized when the first Tweener is created.
            HOTween.Init(true, true, true);
            //HOTween's OverwriteManager works in the background, and automatically
            //checks if a running tween needs to be overwritten by a newly started one.
            HOTween.EnableOverwriteManager();
            //If true, shows the eventual paths in use by PlugVector3Path while playing
            //inside Unity's Editor (and if the Editor's Gizmos button is on).
            HOTween.showPathGizmos = true;
            //exclude less important warnings, e.g. when changing tween parameters
            HOTween.warningLevel = WarningLevel.Important;
        }
 // Use this for initialization
 void Start()
 {
     HOTween.Init(false, false, true);
     HOTween.EnableOverwriteManager();
 }
示例#8
0
 public void OnContextInitialized()
 {
     HOTween.Init(false, false, true);
     HOTween.EnableOverwriteManager();
 }