コード例 #1
0
    private void Start()
    {
        Vibration.Init();

        GameUI.SetInitialDisplayedKnifeCount(knifeCount);
        SpawnKnife();
    }
コード例 #2
0
ファイル: GlitchEffect.cs プロジェクト: maiasaumi/alien
 void Start()
 {
     Vibration.Init();
     Debug.Log(proximity);
     StartCoroutine(VibrateWithProximity());
     _material = new Material(Shader);
 }
コード例 #3
0
 private void Start()
 {
     m_startPosition   = gameObject.transform.position;
     m_pointsText.text = "+" + point + "";
     boid = gameObject;
     Vibration.Init();
 }
コード例 #4
0
    void Start()
    {
        circle     = GameObject.FindWithTag("Circle");
        GameManag  = GameObject.Find("GameManager");
        hitsScript = GameManag.GetComponent <GameManagers>();
        MCanvas    = GameObject.Find("MainCanvas");

        Vibration.Init();
    }
コード例 #5
0
 private void Awake()
 {
     _rigidbody   = GetComponent <Rigidbody>();
     _boxCollider = GetComponent <BoxCollider>();
     SetBoxCollider(true);
     Vibration.Init();
     _moneyText = GameObject.FindWithTag("Money").GetComponent <SetText>();
     _scoreText = GameObject.FindWithTag("Score").GetComponent <ScoreText>();
 }
コード例 #6
0
ファイル: GameCtrl.cs プロジェクト: fukymaka/Knife-Hit-Clone
    private void Start()
    {
        knifeOnStartScreen = Instantiate(knifePrefab);
        knifeOnStartScreen.transform.position = new Vector2(0, -1);

        SkinShop.S.SetCurrentSkin();

        Vibration.Init();
    }
コード例 #7
0
 // Start is called before the first frame update
 void Awake()
 {
     Vibration.Init();
     recordKni = PlayerPrefs.GetInt("RK");
     GetComponent <SpriteRenderer>().sprite = log.masterPiece;
     goal                  = log.knivesNeeded;
     allKnives             = PlayerPrefs.GetInt("AK");
     this.spriteRenderer   = GetComponent <SpriteRenderer>();
     this.circleCollider2D = GetComponent <CircleCollider2D>();
 }
コード例 #8
0
    protected override void Initialize()
    {
        QualitySettings.vSyncCount  = 0;
        Application.targetFrameRate = 60;

        LoadMainScene();
        StageMax = sceneNames.Length;
        Vibration.Init();
        // Bind();
    }
コード例 #9
0
    public void KillEnemy()
    {
        Vibration.Init();
        Vibration.VibratePop();
        AudioSource.PlayClipAtPoint(deathSound, new Vector3(0, 0, -10), 0.7f);
        var splatter = Instantiate(enemySplatter, gameObject.transform.position, gameObject.transform.rotation);

        splatter.Play();
        Destroy(gameObject);
    }
コード例 #10
0
ファイル: SaveManager.cs プロジェクト: SemenIlin/MyFishMaster
    private void Awake()
    {
        Vibration.Init();
        if (Instance == null)
        {
            Instance = this;
        }
        filePath = Application.persistentDataPath + "data.gamesave";

        LoadGame();
    }
コード例 #11
0
ファイル: Loading.cs プロジェクト: WiktorChlamov/Apple
 private void Awake()
 {
    if (audioSource == null)
     {
         audioSource = Instantiate(GameObjects.gameObjects.Music);
         DontDestroyOnLoad(audioSource);
     };
     Vibration.Init();
     Levels.Stages(Data.CurrentStage);
     gameObject.SetActive(true);
     Data.Load();
 }
コード例 #12
0
    private void Start()
    {
        isGameActive = true;
        knivesCount  = Random.Range(minKnivesAtLevel, maxKnivesAtLevel);
        gameUI.SetKnivesCount(knivesCount);
        KnifeSpawn();
        appleScore = Database.instance.LoadAppleScore();
        gameScore  = 0;
        levelIndex = 1;
        ScoresController.instance.RefreshScore(gameScore, appleScore);

        Vibration.Init(); //To perform vibrations.
    }
コード例 #13
0
    private void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        plane           = new Plane(new Vector3(0.0f, -2f, 0.0f), new Vector3(-0.2f, 0.8f, 1f));
        _sliceableAsync = GetComponent <IBzSliceableAsync> ();

        Vibration.Init();
    }
コード例 #14
0
ファイル: UI.cs プロジェクト: stryder123451/KnifeHitClone
    // Start is called before the first frame update
    void Start()
    {
        debugScreen.SetActive(false);
        string path = Application.persistentDataPath + "/progress.bin";

        if (File.Exists(path))
        {
            stageMax    = Save.LoadPlayer().stage;
            bonusAmount = Save.LoadPlayer().bonus;
            record      = Save.LoadPlayer().record;
        }
        Vibration.Init();
        enemy1.SetActive(false);
        enemy.SetActive(false);
        knifeCount = Random.Range(1, 5);
        boss.SetActive(false);
    }
コード例 #15
0
    private void Start()
    {
        float screenRatio = (float)Screen.height / Screen.width; //Adjust UI and camera view to fit screen size

        if (screenRatio < 1.7f)
        {
            Camera.main.GetComponent <CameraConstantWidth>().WidthOrHeight = 1f;
        }
        else if (screenRatio > 1.95f)
        {
            GameObject.Find("Canvas").GetComponent <CanvasScaler>().matchWidthOrHeight = .6f;
        }

        InitializeNotifications(); //Push notifications init and shedule in 8 hours
        CreateNotification("Hello!", "It's time to throw knives! ", System.DateTime.Now.AddSeconds(28800));

        Vibration.Init();
    }
コード例 #16
0
    public void DecreaseHealth()
    {
        Vibration.Init();
        Vibration.VibrateNope();
        AudioSource.PlayClipAtPoint(hitSound, new Vector3(0, 0, -10));
        GetComponent <SpriteFlash>().Flash();
        health--;
        GameObject.Find("HUD").GetComponent <HudManager>().setHealthbar(health);

        if (health <= 0)
        {
            ShowAd();
            gameOverMoneyText.text = $" + {coins}";
            gameOverScreen.GetComponent <GameOver>().ActivateGameOver();
            gameProperties.GetComponent <GameProperties>().IncreaseMoney(coins);
            endScoreText.text = $"Score: {score}";
            gameObject.SetActive(false);
            ES3AutoSaveMgr.Current.Save();
        }
    }
コード例 #17
0
    private int vibrationOption;                                //переменная показывающая нужно включать вибрацию или нет

    private void Start()
    {
        vibrationOption = PlayerPrefs.GetInt("Vibration");      //Получаем значение опции вибрация
        Vibration.Init();                                       //инициализируем скрипт с методами вибрации
    }
コード例 #18
0
 private void Awake()
 {
     Vibration.Init();
     knifeRigidbody = GetComponent <Rigidbody2D>();
     knifeCollider  = GetComponent <BoxCollider2D>();
 }
コード例 #19
0
    private void Awake()
    {
        _automationType.Add(AutomationType.ClickAutomation, new ClickAutomation());
        _automationType.Add(AutomationType.UsualAutomation, new UsualAutomation());

        _skillType.Add(SkillType.AutomationPower, new AutomationPowerUpgrader());
        _skillType.Add(SkillType.AutomationsPower, new AutomationsDamageUpgrader());
        _skillType.Add(SkillType.ClickPower, new ClickPowerUpgrader());
        _skillType.Add(SkillType.AutomationClickPower, new ClickPowerAutomationUpgrader());

        if (_deleteExistingDataOnDevice)
        {
            DeleteData();
        }

        if (FileOperations.IsFileExist(_settingsDataFileName) == false)
        {
            _playerData.Init();
            _badgeData.Init();
            _automationsData.Init();
            SaveData();
        }
        else
        {
            GetData();
        }

#if UNITY_EDITOR
        _godMode.Init(_playerData);
#endif

        var builder = new AutomationBuilder(_playerData, _automationsData, _automationPrefab);
        foreach (var automationData in _automationData)
        {
            builder.InstantiateAutomation(_automationsParent, automationData.Data);
            builder.SetAutomationType(_automationType[automationData.AutomationType]);
            var skillsData = automationData.Data.UpgradeComponents;
            foreach (var skill in skillsData)
            {
                builder.AddSkill(_skillType[skill.Skill], skill);
            }
        }

        _tutorial.Init(_playerData);
        _audioService.Init();
        _settings.Init(_settingsData);
        Vibration.Init(_settingsData);
        _farmLevelButton.Init(_playerData);
        _adsManager.Init();
        _offlineProgress.Init(_playerData, _badgeData, _automationsData);
        _gameResetter.Init(
            _playerData,
            _automationsData,
            _badgeData,
            _defaultAutomationsData);
        _playerStatsPresentation.Init(_playerData);
        _badge.Init(_playerData, _automationsData, _badgeData);
        _automationsService = new AutomationsService(_playerData, _automationsData);
        //_automationsService.Init(_playerData, _automationsData);
        _playerData.IsReturningPlayer = true;
    }
コード例 #20
0
 private void Start()
 {
     InitializeObjects();
     UploadData();
     Vibration.Init();
 }
コード例 #21
0
ファイル: Throw.cs プロジェクト: stryder123451/KnifeHitClone
 // Start is called before the first frame update
 void Start()
 {
     Vibration.Init();
     // scoreText.GetComponent<Text>().text = score.ToString();
 }
コード例 #22
0
 private void Start()
 {
     Vibration.Init();
 }
コード例 #23
0
ファイル: Level.cs プロジェクト: Naxaes/AGI20_Group4_KapplAR
 public void Start()
 {
     Vibration.Init();
 }
コード例 #24
0
 // Use this for initialization
 void Start()
 {
     Vibration.Init();
     Debug.Log("Application.isMobilePlatform: " + Application.isMobilePlatform);
     txtAndroidVersion.text = "Android Version: " + Vibration.AndroidVersion.ToString();
 }
コード例 #25
0
 // Start is called before the first frame update
 void Start()
 {
     Vibration.Init();
     PlayerPrefs.SetInt("Level", SceneManager.GetActiveScene().buildIndex);
 }
コード例 #26
0
 public void Equip()
 {
     Vibration.Init();
     Vibration.VibrateNope();
     gameManager.GetComponent <GameProperties>().SetPlayerSprite(playerSprite.GetComponent <Image>().sprite);
 }