Esempio n. 1
0
    void Awake()
    {
        forSnake = 0;

        SetPointsObstacles(pointsObstacles);
        instace = this;
    }
Esempio n. 2
0
 public void Construct(Scores scores, FinalPopup finalPopup, PlayerController playerController,
                       ObstaclesController obstaclesController)
 {
     _scores              = scores;
     _finalPopup          = finalPopup;
     _playerController    = playerController;
     _obstaclesController = obstaclesController;
 }
 public void Construct(ObstaclesController obstaclesController, LocationSettings locationSettings, FinalPopup finalPopup,
                       StartText startText, ICreationManager creationManager)
 {
     _obstaclesController = obstaclesController;
     _finalPopup          = finalPopup;
     _startText           = startText;
     _creationManager     = creationManager;
     _jumpForce           = locationSettings.JumpForce;
     _firstTap            = true;
 }
Esempio n. 4
0
 void Awake()
 {
     loaded = false;
     if (socket == null)
     {
         ter    = GetComponent <CreateTerrainMesh>();
         obs    = GetComponent <ObstaclesController>();
         foods  = GetComponent <FoodsController>();
         socket = GetComponent <EESocketIOComponent>();
     }
 }
    // Start is called before the first frame update
    void Start()
    {
        _bgFar   = GameObject.Find("BackgroundFar").GetComponent <BG_Controller>();
        _bgMid   = GameObject.Find("BackgroundMid").GetComponent <BG_Controller2>();
        _bgClose = GameObject.Find("BackgroundClose").GetComponent <BG_Controller3>();

        _ground         = GameObject.Find("Ground");
        _groundAnimated = GameObject.Find("GroundAnimated");
        _groundAnimated.SetActive(false);

        _score = GameObject.Find("Timer").GetComponent <Score>();

        //This should not be here
        //_hero = GameObject.Find("Hero").GetComponent<HeroMovement>();
        _heroPrefab = GameObject.Find("Hero");
        _heroPrefab.SetActive(false);

        _car                 = GameObject.Find("Car");
        _hunter              = GameObject.Find("Hunter");
        _hunterSprite        = _hunter.GetComponent <SpriteRenderer>();
        _hand                = GameObject.Find("HunterArm");
        _carAnimator         = GameObject.Find("Car").GetComponent <Animator>();
        _hunterAnimator      = GameObject.Find("Hunter").GetComponent <Animator>();
        _obstaclesController = GameObject.Find("Obstacles").GetComponent <ObstaclesController>();

        //Activate hunter
        _hand.SetActive(false);
        //_hunter.SetActive(false);
        _hunterSprite.enabled = false;
        _car.SetActive(false);

        StartCoroutine(StartGameAfterIntro());
        _deadMenu = GameObject.Find("Canvas").GetComponent <DeadMenu>();

        skipIntroButton = GameObject.Find("SkipIntro");
    }
Esempio n. 6
0
 public ObstaclesCreater(ObstaclesController obstacles, PrefabsID prefabsID, IPool pool)
 {
     _obstacles = obstacles;
     _prefabsID = prefabsID;
     _pool      = pool;
 }