示例#1
0
    private void OnEnable()
    {
        ColorMass = serializedObject.FindProperty("_BonusColors");

        _needCount = Enum.GetValues(typeof(BonusType)).Length;
        _component = (BonusManager)target;
    }
示例#2
0
    void finishBox()
    {
        if (BonusManager.getbonusDestroyAllBox())
        {
            GameManager.scoreUp += pointNumber;
        }

        GameObject effect = effectBox;

        if (effectBox != null)
        {
            if (colorIndexSave == 1)
            {
                effect.GetComponent <Renderer>().material = e1;
            }
            else if (colorIndexSave == 2)
            {
                effect.GetComponent <Renderer>().material = e2;
            }
            else if (colorIndexSave == 3)
            {
                effect.GetComponent <Renderer>().material = e3;
            }
            else
            {
                effect.GetComponent <Renderer>().material = e4;
            }
            Instantiate(effect, transform.position, Quaternion.identity);
        }
        Destroy(transform.gameObject);
    }
示例#3
0
    void Update()
    {
        if (!GameManager.isGameOver)
        {
            rb1.velocity = -speedBackground * (new Vector3(0, 0, 1).normalized);
            rb2.velocity = -speedBackground * (new Vector3(0, 0, 1).normalized);

            if (BonusManager.getbonusSlow())
            {
                speedBackground = BonusManager.slowOn;
            }
            else
            {
                speedBackground = GameManager.speedBox;
            }
            if (background1.transform.position.z < -25)
            {
                background1.transform.position = new Vector3(background1.transform.position.x, background1.transform.position.y, 35.9f);
            }
            else if (background2.transform.position.z < -25)
            {
                background2.transform.position = new Vector3(background2.transform.position.x, background2.transform.position.y, 35.9f);
            }
        }
        else
        {
            rb1.velocity = new Vector3(0, 0, 0);
            rb2.velocity = new Vector3(0, 0, 0);
        }
    }
    private void AddPiontToScore(BoxScript bs)
    {
        if (bs.pointNumber >= 0)
        {
            if (bs.pointNumber < User.Instance.powerLevel)
            {
                GameManager.scoreUp += bs.pointNumber;
            }
            else
            {
                GameManager.scoreUp += User.Instance.powerLevel;
            }

            if (BonusManager.getbonusDamageBall())
            {
                bs.pointNumber -= User.Instance.powerLevel * 2;
                bs.color();
            }
            else
            {
                bs.pointNumber -= User.Instance.powerLevel;
                bs.color();
            }
        }
    }
    //public GameObject bonusCanvas;

    void Start()
    {
        i           = 0;
        maxNum      = 41;
        numMan      = GameObject.Find("ScriptHolder").GetComponent <NumberManager> ();
        bonusMan    = GameObject.Find("ScriptHolder").GetComponent <BonusManager>();
        numGenClass = GameObject.Find("ScriptHolder").GetComponent <GenerationOfNumbers>();
    }
    /********************************************************************************
    *  ------------------------------- UNITY SECTION -----------------------------------
    *********************************************************************************
    *  -This section contains all functions used by the Unity Engine
    ********************************************************************************/


    //Use this for initialization
    void Start()
    {
        //Make player persist
        DontDestroyOnLoad(this);

        //Fetch animator and database manager
        _animator = GetComponent <Animator>();

        networkManager = GameObject.Find("DatabaseManager").GetComponent <NetworkManager>();
        //Initialize some stuff
        Stats = GetComponent <PlayerStats>();
        LoadLevel();
        //Get sorting layer and order
        DefaultSortingLayer = GetComponent <SpriteRenderer>().sortingLayerName;
        DefaultSortingOrder = GetComponent <SpriteRenderer>().sortingOrder;
        //Initialize inventory
        for (int i = 0; i < 12; i++)
        {
            equippedGear.Add(null);
        }
        //If CPU then start CPU script and return (CPUs don't need to do anything else)
        if (CPU)
        {
            Health = BaseHealth;
            StartAI();
            return;
        }
        //Instantiate inventory (if not in combat)
        if (!InCombat)
        {
            Instantiate(PlayerInventory);
        }
        //Attach camera, only if CameraFollow script is attached to it
        var camera = GameObject.FindGameObjectWithTag("MainCamera");

        if (camera != null)
        {
            if (camera.GetComponent <CameraFollow>() != null)
            {
                camera.GetComponent <CameraFollow>().SetTarget(transform);
            }
        }

        //Load equipment and player stats from database (make sure to load stats first)
        networkManager.RetrievePlayerStats(gameObject);
        networkManager.RetrievePlayerEquipment(this);

        //Scale player's health AFTER the stats and equipment have loaded
        Health = BaseHealth;

        //Activate any bonuses
        bonusManager = new BonusManager(Stats, GetComponent <Inventory>(), networkManager);
        bonusManager.ProcessBonusCode(networkManager.EnteredBonusCode);

        //Update player label
        UpdatePlayerLabel();
    }
示例#7
0
 private void Init()
 {
     playerLifesLeft = playerLifes;
     levelGenerator  = GameObject.FindGameObjectWithTag("LevelGrid").GetComponent <LevelGenerator>();
     uiController    = GetComponent <UIController>();
     uiController.LifesAmountUpdate(playerLifesLeft);
     bonusManager           = FindObjectOfType <BonusManager>();
     currentChaseInaccuracy = chaseInnacuracy;
 }
示例#8
0
 public void NextLevel()
 {
     GameCicle.Pause = false;
     CreateBlocks(LevelConfiguration);
     Player.GoToStart();
     _currentPlayerPosition = LevelConfiguration.PlayerStartPosition.x;
     BallController.Stop();
     BallController.GoToStart(Vector2.one * BallEnergy);
     RemainingTime += TimeSpan.FromSeconds(LevelConfiguration.StartTime);
     BonusManager.Release();
 }
示例#9
0
        public void ShouldGetBirthdayBonus_WithVariousCustomers_ReturnsExpectedResult(Customer customer, DateTime dateTimeToCheck, bool expected)
        {
            // Arrange
            BonusManager sut = new BonusManager();

            // Act
            bool actual = sut.ShouldGetBirthdayBonus(customer, dateTimeToCheck);

            // Assert
            Assert.Equal(expected, actual);
        }
示例#10
0
    public void Init(BallsManager ballsManager, CorridorsConductor corridorsConductor, BonusManager bonusManager, PlayerController playerController, LeaderBoard leaderBoard, ExplosionBonus explosionBonus)
    {
        _ballsManager = ballsManager;
        _ballsManager.Initialize(corridorsConductor);

        _bonusManager     = bonusManager;
        _playerController = playerController;

        _leaderBoard    = leaderBoard;
        _explosionBonus = explosionBonus;
    }
示例#11
0
 // Use this for initialization
 void Start()
 {
     if (Instance == null)
     {
         Instance       = this;
         activCard      = FindObjectOfType <ActivCardMoving>();
         chameleonPanel = FindObjectOfType <ChameleonPanel>();
         LoadInfo();
         CreatePoll();
     }
 }
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != null)
     {
         Destroy(gameObject);
     }
 }
示例#13
0
 // the Awake function is called before Start() and Update()
 void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this);
     }
 }
示例#14
0
    public void Die()
    {
        IsAlive = false;
        Material dying = new Material(DyingMaterial);

        dying.SetFloat("_Displacement", 0);
        GetComponent <MeshRenderer>().material = dying;
        gameObject.tag     = "Untagged"; // pour ne plus être considéré comme ennemi après la mort
        _Collider0.enabled = false;
        _Collider1.enabled = false;
        Outline.SetActive(false);
        HitParticles.hit = true;

        BonusManager bonusManager = FindObjectOfType <BonusManager>();

        if (bonusManager.HasToPopABonus())
        {
            BonusCarried = bonusManager.GetNextBonus();
            bonusManager.EmptyNextBonus();

            if (BonusCarried.GetComponent <BonusBehaviour>().bonusType == BonusBehaviour.BonusType.WEAPON)
            {
                Instantiate(BonusCarried, transform.position, Quaternion.Euler(90.0f, 0.0f, 0.0f));
            }
            else
            {
                Instantiate(BonusCarried, transform.position, Quaternion.identity);
            }
        }

        KillScript.enabled = true;
        KillScript.SetMaterial(dying);

        if (SceneManager.GetActiveScene().name == "TitleScreen")
        {
            if (gameObject.name == ("Enemy_PLAY"))
            {
                Invoke("LoadGame", 2.0f);
            }
            else if (gameObject.name == ("Enemy_CONTROLS"))
            {
                Invoke("LoadControls", 2.0f);
            }
            else if (gameObject.name == ("Enemy_QUIT"))
            {
                Application.Quit();
            }
        }
        else if (SceneManager.GetActiveScene().name == "Controls")
        {
            Invoke("LoadTitle", 2.0f);
        }
    }
示例#15
0
    void Update()
    {
        if (!GameManager.isGameOver)
        {
            if (transform.tag.Equals(BoxScript.sMoving_Box))
            {
                if (transform.position.x >= SpawnBox.sizeLine - 1.5f)
                {
                    moveXY = -1.5f;
                }
                else if (transform.position.x <= -0.5f)
                {
                    moveXY = SpawnBox.sizeLine + 0.5f;
                }
                transform.position = Vector3.MoveTowards(transform.position, new Vector3(moveXY, transform.position.y, transform.position.z), 0.015f);
            }
            else if (transform.tag.Equals(BoxScript.sDownUp_Box))
            {
                if (transform.position.y >= 4.5f)
                {
                    moveXY = -2.5f;
                }
                else if (transform.position.y <= 0.5f)
                {
                    moveXY = 6.5f;
                }
                transform.position = Vector3.Lerp(transform.position, new Vector3(transform.position.x, moveXY, transform.position.z), 0.015f);
            }

            rb.velocity = -speedBox * (new Vector3(0, 0, 1).normalized);
            if (BonusManager.getbonusSlow())
            {
                speedBox = BonusManager.slowOn;
            }
            else
            {
                speedBox = GameManager.speedBox;
            }
        }
        else
        {
            rb.velocity        = new Vector3(0, 0, 0);
            transform.position = Vector3.Lerp(transform.position, new Vector3(transform.position.x, transform.position.y, transform.position.z), 0);
        }
        if (pointNumber <= 0 || BonusManager.getbonusDestroyAllBox())
        {
            if (!transform.tag.Equals(sEmptyBox))
            {
                finishBox();
            }
        }
    }
示例#16
0
        public Session()
        {
            _currentMap = GameObject.FindGameObjectWithTag(Tags.kMapTag).GetComponent <MapGenerator> ();
            var player = GameObject.FindGameObjectWithTag(Tags.kPlayerTag);

            if (player != null)
            {
                _player = player.GetComponent <Player> ();
            }

            _bm         = new BonusManager();
            _references = new ReferenceStorage();
        }
示例#17
0
    static public void DestroyCell(int x, int y, TypeLineBonus typeLine)
    {
        Field      field = BonusManager.GetField();
        GameObject lizer = (GameObject)Instantiate(BonusManager.GetLizerPrefab(), field.cells[x, y].transform.position, field.cells[x, y].transform.rotation);
        float      speed = 0.7f;

        switch (typeLine)
        {
        case TypeLineBonus.Horizontal:
        {
            for (int i = 0; i < Field.size; i++)
            {
                lizer.transform.localEulerAngles = Vector3.zero;
            }

            if (Field.size / 2 > x)
            {
                speed = Mathf.Abs((x - Field.size / 2) + 1);
            }
            else
            {
                speed = (x - Field.size / 2);
            }
            speed = 0.7f - speed / 10;
            break;
        }

        case TypeLineBonus.Verical:
        {
            for (int i = 0; i < Field.size; i++)
            {
                lizer.transform.localEulerAngles = new Vector3(0, 0, 90);
            }

            if (Field.size / 2 > y)
            {
                speed = Mathf.Abs((y - Field.size / 2) + 1);
            }
            else
            {
                speed = (y - Field.size / 2);
            }
            speed = 0.7f - speed / 10;
            break;
        }
        }

        lizer.transform.DOScale(new Vector3(10, 0.1f, 1), speed / 1.5f).OnComplete(delegate { DestroyCellInLine(x, y, typeLine); Destroy(lizer); });
    }
示例#18
0
    void Update()
    {
        if (!GameManager.isGameOver && Time.time > nextShoot)
        {
            nextShoot = Time.time + timeSpawnBall;
            if (BonusManager.getbonusVector())
            {
                SpawnBall(bonusDirectionR);
                SpawnBall(bonusDirectionL);
            }
            else
            {
                SpawnBall(standardDirection);

                if (BonusManager.getbonusDamageBall())
                {
                    setBallTime(4);
                }
                else
                {
                    setBallTime(1);
                }
            }
        }
        if (GameManager.isGameOver)
        {
            Destroy(gameObject);
            Instantiate(effectBox, transform.position, Quaternion.identity);
        }
        if (Input.GetMouseButtonDown(0))
        {
            if (!GameManager.isGameOver)
            {
                TempPos = transform.position;
                float distance = transform.position.z - Camera.main.transform.position.z;
                targetPos = new Vector3(Input.mousePosition.x, 0, distance);
                targetPos = Camera.main.ScreenToWorldPoint(targetPos);
                Vector3 followXonly = new Vector3(targetPos.x * speedMove, transform.position.y, transform.position.z);
                tempX = followXonly - TempPos;
            }
        }
        if (Input.GetMouseButton(0) && !GameManager.isGameOver)
        {
            move();
        }
    }
示例#19
0
 void Update()
 {
     if (!GameManager.isGameOver)
     {
         if (BonusManager.getbonusSlow())
         {
             speedBonus = BonusManager.slowOn;
         }
         else
         {
             speedBonus = GameManager.speedBox;
         }
         rb.velocity = -speedBonus * (tempRb.normalized);
     }
     else
     {
         rb.velocity = new Vector3(0, 0, 0);
     }
 }
示例#20
0
        public BonusNoticeInfo AddBonusNotify(string xml)
        {
            BonusNoticeInfo info = XmlAnalyzer.AnalyseXmlToCommunicationObject <BonusNoticeInfo>(xml);

            try
            {
                BonusEntity bonusEntity = new BonusEntity();
                bonusEntity.GameName      = info._Body._BonusInfo._Issue.GameName;
                bonusEntity.IssuseNumber  = info._Body._BonusInfo._Issue.Number;
                bonusEntity.BonusNumber   = info._Body._BonusInfo.BonusNumber;
                bonusEntity.TotalItems    = info._Body._BonusInfo.TotalItems;
                bonusEntity.TotalMoney    = info._Body._BonusInfo.TotalMoney;
                bonusEntity.NoticeId      = info.Id;
                bonusEntity.IsDistributed = false;
                using (ILHDBTran tran = BeginTran())
                {
                    BonusManager bonusManager = new BonusManager(tran);
                    bonusManager.AddBonus(bonusEntity);
                    List <BonusDetailEntity> bonusDetailList = new List <BonusDetailEntity>();
                    foreach (BonusMappingInfo.BonusItem bonusItem in info._Body._BonusInfo._BonusItemList)
                    {
                        BonusDetailEntity detail = new BonusDetailEntity();
                        detail.TicketId     = bonusItem.TicketId;
                        detail.BonusLevel   = bonusItem.BonusLevel;
                        detail.PlayType     = (int)bonusItem.PlayType;
                        detail.Money        = bonusItem.Money;
                        detail.IsBombBonus  = bonusItem.IsBombBonus;
                        detail.Size         = bonusItem.Size;
                        detail.GameName     = bonusEntity.GameName;
                        detail.IssuseNumber = bonusEntity.IssuseNumber;
                        bonusManager.AddBonusDetail(detail);
                    }
                    tran.Commit();
                }
                return(info);
            }
            catch (Exception ex)
            {
                string errMsg = "添加返奖通知失败!" + xml;
                throw HandleException(LogCategory.Notice, errMsg, ex);
            }
        }
示例#21
0
    private void Init()
    {
        aStarGrid        = GameObject.FindGameObjectWithTag("AStar").GetComponent <ASGrid>();
        camController    = Camera.main.GetComponent <CameraController>();
        gridSpawner      = GetComponent <GridSpawner>();
        bonusTestManager = FindObjectOfType <BonusManager>();
        gridSpawner.SetGridTransformr(transform);
        thisTransform = transform;
        camController.SetCamSize(gridSize.x, gridSize.y, cellDiameter);
        Action <Vector3[, ]> level1 = SetLevel1;
        Action <Vector3[, ]> level2 = SetLevel2;
        Action <Vector3[, ]> level3 = SetLevel3;

        levelsList = new Dictionary <int, Action <Vector3[, ]> >
        {
            { 1, level1 },
            { 2, level2 },
            { 3, level3 }
        };
    }
示例#22
0
    void Start()
    {
        gManager       = GameObject.FindObjectOfType <GameManager>();
        bManager       = GameObject.FindObjectOfType <BonusManager>();
        iManager       = GameObject.FindObjectOfType <InputsManager>();
        infoUI         = GameObject.FindObjectOfType <InfosUI>();
        audioManager   = GameObject.FindObjectOfType <AudioManager>();
        spriteRenderer = GetComponent <SpriteRenderer>();
        audioSource    = GetComponent <AudioSource>();
        colors         = new int[4];
        ShuffleColors();
        maxLife += ApplicationDatas.Game.Bonus[Upgrades.LifeBonus];
        infoUI.InitLife(maxLife);
        life       = maxLife;
        movement.y = speed;

        //On set les effets des bonus
        bManager.OnBonusGet(BonusName.LIFE, new BonusManager.BonusAction(WinLife));
        bManager.OnBonusGet(BonusName.MULTI_STRIKES, new BonusManager.BonusAction(() => gManager.StartMultiColors()));
        bManager.OnBonusLost(BonusName.MULTI_STRIKES, new BonusManager.BonusAction(() => gManager.StopMultiColors()));
    }
示例#23
0
    private void Awake()
    {
        life = MaxLife;

        // Setting up references.
        groundCheck  = transform.Find("GroundCheck");
        ceilingCheck = transform.Find("CeilingCheck");
        anim         = GetComponent <Animator>();
        rb           = GetComponent <Rigidbody2D>();

        kamehamehas = new Pool <Bullet>(kamehameha, 8, 16);
        kamehamehas.automaticReuseUnavailables = true;

        tornados = new Pool <Bullet>(special_tornado, 4, 8);
        tornados.automaticReuseUnavailables = true;

        cam           = Camera.main.GetComponent <CharacterCamera>();
        audio_process = AudioProcessor.Instance;
        Enemy_manager = EnemyManager.Instance;
        Bonus_manager = BonusManager.Instance;
    }
示例#24
0
        internal void GoToHotelView()
        {
            if (Session == null || Session.GetHabbo() == null)
            {
                return;
            }

            if (Session.GetHabbo().roomIdQueue > 0)
            {
                RoomQueue rQueue = OtanixEnvironment.GetGame().GetRoomQueueManager().GetRoomQueue(Session.GetHabbo().roomIdQueue);
                if (rQueue != null)
                {
                    rQueue.RemoveUserToQueue(Session.GetHabbo().Id);
                }

                Session.GetHabbo().roomIdQueue = 0;

                Session.GetMessageHandler().GetResponse().Init(Outgoing.OutOfRoom);
                Session.GetMessageHandler().SendResponse();

                return;
            }

            if (Session.GetHabbo().InRoom)
            {
                var currentRoom = Session.GetHabbo().CurrentRoom;
                if (currentRoom != null && currentRoom.GetRoomUserManager() != null)
                {
                    currentRoom.GetRoomUserManager().RemoveUserFromRoom(Session, true, false);
                }
            }
            else
            {
                Session.GetMessageHandler().GetResponse().Init(Outgoing.OutOfRoom);
                Session.GetMessageHandler().SendResponse();
            }
            Session.SendMessage(BonusManager.GenerateMessage(Session));
        }
示例#25
0
    // Use this for initialization
    protected override void Start()
    {
        base.Start();
        sideMovement = new Vector2(sideStepSpeed, 0);
        leftHand     = transform.Find("LeftHand");
        rightHand    = transform.Find("RightHand");
        bonusManager = FindObjectOfType <BonusManager>();
        enemySpawner = FindObjectOfType <EnemySpawner>();
        bow          = transform.Find("Bow").GetComponent <SpriteRenderer>();
        bigCurse     = transform.Find("BigCurse").GetComponent <SpriteRenderer>();
        anim         = GetComponent <Animator>();
        currentAnim  = "Walk";

        rageMultiplier = 1.0f;

        //AttackPhase
        attackPatterns.Add(new BossAction(FireArrows));
        attackPatterns.Add(new BossAction(Center));
        attackPatterns.Add(new BossAction(ThrowKnives));
        attackPatterns.Add(new BossAction(BombsAway));

        //RunPhase
        attackPatterns.Add(new BossAction(Center));
        attackPatterns.Add(new BossAction(RunAway));
        attackPatterns.Add(new BossAction(SpawnAdds));

        //FinalAttack
        attackPatterns.Add(new BossAction(FinalTransition));
        attackPatterns.Add(new BossAction(FinalAttack));

        actions[BossPhase.BEGIN]   = new BossAction(Entrance);
        actions[BossPhase.PATTERN] = new BossAction(Patterns);
        actions[BossPhase.END]     = new BossAction(Finish);

        hero.Pause();
        currentPhase = KBPhaseLimit.ATTACK;
    }
示例#26
0
 // Use this for initialization
 void Awake()
 {
     instance = this;
     DontDestroyOnLoad(gameObject);
     _bonus = new GameObject[8];
 }
示例#27
0
    private void Awake()
    {
        life = MaxLife;

        // Setting up references.
        groundCheck = transform.Find("GroundCheck");
        ceilingCheck = transform.Find("CeilingCheck");
        anim = GetComponent<Animator>();
        rb = GetComponent<Rigidbody2D>();

        kamehamehas = new Pool<Bullet>(kamehameha, 8, 16);
        kamehamehas.automaticReuseUnavailables = true;

        tornados = new Pool<Bullet>(special_tornado, 4, 8);
        tornados.automaticReuseUnavailables = true;

        cam = Camera.main.GetComponent<CharacterCamera>();
        audio_process = AudioProcessor.Instance;
        Enemy_manager = EnemyManager.Instance;
        Bonus_manager = BonusManager.Instance;
    }
示例#28
0
	void Awake()
	{
		#region - singleton -
		m_Instance = this;
		#endregion
	}
示例#29
0
        internal void ContinueLoading()
        {
            DateTime Start;
            TimeSpan TimeUsed;

            using (IQueryAdapter dbClient = OtanixEnvironment.GetDatabaseManager().getQueryreactor())
            {
                EmuSettings.Initialize(dbClient);

                Start = DateTime.Now;
                Ranks.LoadMaxRankId(dbClient);
                Catalog.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catalog Cache -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Filter.Filter.Initialize();
                Filter.BlackWordsManager.Load(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Filter -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                BanManager.LoadBans(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Ban Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                newsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("News Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ItemManager.LoadItems(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Item Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Furnidata.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Furnidata -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PromotionalBadgesManager.loadPromotionalBadges(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Promotional Badges Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoleManager.LoadRanks(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Ranks -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Navigator.Initialize(dbClient);
                NewNavigatorManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Navigator -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoomManager.LoadModels(dbClient);
                RoomManager.InitVotedRooms(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Room Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AchievementManager.Initialize(dbClient);
                questManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Quest Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ModerationTool.LoadMessagePresets(dbClient);
                ModerationTool.LoadModActions(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Moderation Tool -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetRace.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Pet Race -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetOrders.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Pet Orders -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                GuildsPartsManager.InitGroups(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Guilds Parts Manager-> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.InitCache();
                CatalogPremium.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catalog Manager -> PRONTO (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                SongManager.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Song Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                youtubeManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Youtube TV Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                piñataManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Piñata Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                talentManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Talent Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                TargetedOfferManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Targeted Offer Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                CraftableProductsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Craftable Products Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ClothingManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Clothing Manager-> PRONTO (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PrisaoManager.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Prison Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                LandingTopUsersManager.Initialize(dbClient);
                LandingTopUsersManager.Load();
                giftManager.init(dbClient);
                SpyChatMessage.Initialize();
                StaffChat.Initialize(dbClient);
                BonusManager.Initialize(dbClient);
                roomRankConfig.Initialize();

                Start = DateTime.Now;
                DatabaseCleanup(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Database -> Cleanup Done (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
            }

            StartGameLoop();

            Logging.WriteLine("Game Loop -> READY ");
        }
 public PeuTravailleeButton(ButtonManager b, BonusManager bonusM) : base(0, 0, -0.5f, 1, b)
 {
     this.bonusM = bonusM;
 }
示例#31
0
        internal void ContinueLoading()
        {
            DateTime Start;
            TimeSpan TimeUsed;

            using (IQueryAdapter dbClient = OtanixEnvironment.GetDatabaseManager().getQueryreactor())
            {
                EmuSettings.Initialize(dbClient);

                Start = DateTime.Now;
                Ranks.LoadMaxRankId(dbClient);
                Catalog.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Catacache -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Filter.Filter.Initialize();
                Filter.BlackWordsManager.Load(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Filtro -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                BanManager.LoadBans(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de Ban -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                newsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Notícia -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ItemManager.LoadItems(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de item -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Furnidata.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de Furnidata -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PromotionalBadgesManager.loadPromotionalBadges(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Emblemas promocionais -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoleManager.LoadRanks(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de papel -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Navigator.Initialize(dbClient);
                NewNavigatorManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Navegador -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoomManager.LoadModels(dbClient);
                RoomManager.InitVotedRooms(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente do quarto -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AchievementManager.Initialize(dbClient);
                questManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de realização -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ModerationTool.LoadMessagePresets(dbClient);
                ModerationTool.LoadModActions(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Ferramenta de moderação-> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetRace.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Sistema de estimação-> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetOrders.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Ordens para animais -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                GuildsPartsManager.InitGroups(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Elementos dos grupos -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.InitCache();
                CatalogPremium.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de catálogo -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                SongManager.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de som -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                youtubeManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Youtube TV Manager -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                piñataManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente Piñata -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                talentManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de talentos -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                TargetedOfferManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente da oferta direta -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                CraftableProductsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de Produtos Crafáveis -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ClothingManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de vestuário-> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PrisaoManager.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Usuários presos -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                LandingTopUsersManager.Initialize(dbClient);
                LandingTopUsersManager.Load();
                giftManager.init(dbClient);
                SpyChatMessage.Initialize();
                StaffChat.Initialize(dbClient);
                BonusManager.Initialize(dbClient);
                roomRankConfig.Initialize();

                Start = DateTime.Now;
                DatabaseCleanup(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Database -> Limpeza realizada! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
            }

            StartGameLoop();

            Logging.WriteLine("[Otanix] @ Gerente de jogo -> PRONTO! ");
        }
示例#32
0
 //public GameObject bonusCanvas;
 void Start()
 {
     i = 0;
     maxNum = 40;
     numMan = GameObject.Find ("ScriptHolder").GetComponent<NumberManager> ();
     bonusMan = GameObject.Find("ScriptHolder").GetComponent<BonusManager>();
     numGenClass = GameObject.Find("ScriptHolder").GetComponent<GenerationOfNumbers>();
 }
 public TresTravailleeButton(ButtonManager b, BonusManager bonusM) : base(0, 0, 3f, 1, b)
 {
     this.bonusM = bonusM;
 }
示例#34
0
 private void NewGameButtonClick(object sender, EventArgs e)
 {
     this.score = 0;
     this.myDoodle = new Doodle();
     this.platformManager = new PlatformManager();
     this.bonusManager = new BonusManager();
     this.bulletManager = new BulletManager();
     this.enemyManager = new EnemyManager();
     this.GameControlPanel.Visible = false;
     this.MainTimer.Start();
 }
示例#35
0
 private void OnDestroyed(object sender, EventArgs eventArgs)
 {
     BonusManager.DropBonus(_blockBonus, View.transform.position);
 }