void Start()
    {
        thisSetActive(buildIndex); //установка данной сцены активной методом из наследуемого класса

        _Player_Assembler = gameObject.AddComponent <Player_Assembler>();
        _Player_Assembler.Player_Creator(new Vector3(0, 1, 0), SceneController.lastForm);
    }
Beispiel #2
0
    void Start()
    {
        thisSetActive(buildIndex); //установка данной сцены активной методом из наследуемого класса
        UnlockDictionary = SceneController.ColorStateDictionary;
        PriceDictionary  = SceneController.ColorPriceDictionary;

        //загрузка фигуры игрока
        player = _Player_Assembler.Player_Creator(new Vector3(0, 2, 2), SceneController.lastForm, playerSize);
    }
Beispiel #3
0
 public void createForms()
 {
     FormsSlide.direction = HorizontalDirection.left;
     for (int i = 0; i < playerAssembler.FiguresQuantity; i++)
     {
         FiguresArray[i]     = playerAssembler.Player_Creator(new Vector3(ScreenBorders.HalfCamWidth * 2, positionArray[i], 2), i);
         FiguresArray[i].tag = "FormForSelection";
     }
 }
Beispiel #4
0
 protected void BaseStart()
 {
     thisSetActive(buildIndex); //установка данной сцены активной методом из наследуемого класса
     ActiveLevelData.Set(currentLevelData);
     Player             = _Player_Assembler.Player_Creator(SceneController.lastForm);
     ScoreGainedOnLevel = new ScoreGainedOnLevel();
     if (ActiveLevelData.TimerIsNeeded)
     {
         localTimer.TurnOn();
     }
 }
Beispiel #5
0
    RaycastHit hit; // интересно, здесь происходит boxing? если так, то было бы более оптимальным объявить эту переменную прямо в Update()?

    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            if (Physics.Raycast(ray, out hit))
            {
                if (hit.collider.gameObject.CompareTag("FormForSelection"))
                {
                    FigureName = hit.collider.gameObject.name;
                    Destroy(CraftSceneController.player);
                    CraftSceneController.player = _Player_Assembler.Player_Creator(new Vector3(0, 2, 2), FigureName, 2);
                    SceneController.lastForm    = FigureName;
                }
            }
        }
    }