Esempio n. 1
0
 void Start()
 {
     Collider2 = GetComponentInChildren <Collider2D>();
     //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
     GMS        = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
     randomBool = true;
 }
Esempio n. 2
0
    // InputManagerComp imc;

    protected override void Start()
    {
        Data          = new PointerEventData(eventSystem);
        Data.position = camPos = new Vector2(cam.pixelWidth * 0.5f, cam.pixelHeight * 0.5f);
        gmsys         = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <GameManagerSystem>();
        imsys         = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <KNInputManagerSystem>();
    }
Esempio n. 3
0
    void Start()
    {
        //Finds the object in this group by name instead of tag
        Cirlce1Live = GameObject.Find("Bolt1");
        Circle2Live = GameObject.Find("Bolt2");
        Circle3Live = GameObject.Find("Bolt3");
        Circle4Live = GameObject.Find("Bolt4");
        Circle5Live = GameObject.Find("Bolt5");

        //
        Sprite1 = this.transform.Find("Bolt1").GetComponentInChildren <SpriteRenderer>();
        Sprite2 = this.transform.Find("Bolt2").GetComponentInChildren <SpriteRenderer>();
        Sprite3 = this.transform.Find("Bolt3").GetComponentInChildren <SpriteRenderer>();
        Sprite4 = this.transform.Find("Bolt4").GetComponentInChildren <SpriteRenderer>();
        Sprite5 = this.transform.Find("Bolt5").GetComponentInChildren <SpriteRenderer>();

        //
        collider1 = this.transform.Find("Bolt1").GetComponentInChildren <Collider2D>();
        collider2 = this.transform.Find("Bolt2").GetComponentInChildren <Collider2D>();
        collider3 = this.transform.Find("Bolt3").GetComponentInChildren <Collider2D>();
        collider4 = this.transform.Find("Bolt4").GetComponentInChildren <Collider2D>();
        collider5 = this.transform.Find("Bolt5").GetComponentInChildren <Collider2D>();

        audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioSource>();

        //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
        GMS = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
    }
    void Start()
    {
        RB = GetComponent <Rigidbody2D>();
        StartCoroutine(OnCountDown()); //this will start the timer when the object Instantiates in the scene

        //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
        GMS = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
    }
Esempio n. 5
0
 void Start()
 {
     //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
     GMS   = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
     audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioSource>();
     //this will find the main object
     center = GameObject.FindGameObjectWithTag("BigGroupCircle").transform;
 }
Esempio n. 6
0
    void Start()
    {
        redlightcircle    = GameObject.FindGameObjectWithTag("RedCircle");
        yellowlightcircle = GameObject.FindGameObjectWithTag("YellowCircle");
        greenlightcircle  = GameObject.FindGameObjectWithTag("GreenCircle");

        //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
        GMS   = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
        audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioSource>();
    }
Esempio n. 7
0
    void Start()
    {
        //Disables the spawn object on awake
        BasicRandomBool = true;
        GroupRandomBool = true;
        BombRandomBool  = true;
        SplitRandomBool = true;

        //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
        GMS = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
    }
Esempio n. 8
0
    public void Start()
    {
        _gameManagerSystem = FindObjectOfType <GameManagerSystem>();

        IsAlive        = true;
        _lives         = MaxLives;
        LivesText.text = "Lives: " + _lives;

        _audioSource = GetComponent <AudioSource>();
        _screenWidth = Mathf.Abs(Camera.main.ViewportToWorldPoint(Vector3.zero).x) - GetComponent <SpriteRenderer>().size.x / 2;
        _startY      = transform.position.y;
    }
    private void Start()
    {
        gmsys = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <GameManagerSystem>();
        imsys = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <KNInputManagerSystem>();
        EnableVR(XRDevice.isPresent);

        XRDevice.deviceLoaded += (s) => {
            if (s.Equals("OpenVR"))
            {
                EnableVR(true);
            }
        };
    }
Esempio n. 10
0
 // Start is called before the first frame update
 void Start()
 {
     Cursor.visible = false;
     sindex         = GameObject.Find("SearchIndex").GetComponent <SearchIndex>();
     gamemanager    = GameObject.Find("GameManagerSystem").GetComponent <GameManagerSystem>();
     sindex.AddLevelAction();
     GameObject.Find("NumLevel").GetComponent <Text>().text = "0" + sindex.actionsUI[SceneManager.GetActiveScene().name].indice;
     word           = sindex.actionsUI[SceneManager.GetActiveScene().name].word;
     listofalphabet = new List <GameObject>();
     foreach (GameObject alphabet in GameObject.FindGameObjectsWithTag("alpha"))
     {
         listofalphabet.Add(alphabet);
     }
     ReorderAlpha();
 }
Esempio n. 11
0
    // Start is called before the first frame update
    void Start()
    {
        sindex            = GameObject.Find("SearchIndex").GetComponent <SearchIndex>();
        gameManagerSystem = GameObject.Find("GameManagerSystem").GetComponent <GameManagerSystem>();
        message           = GameObject.Find("message").GetComponent <Text>();

        AddAlphabiticAction();
        actions.Add("Free my hands", a => FreeHand("both"));
        actions.Add("free left hand", a => FreeHand("left"));
        actions.Add("free right hand", a => FreeHand("right"));
        actions.Add("check my hands", a => Validate("both"));
        actions.Add("check left", a => Validate("left"));
        actions.Add("check right", a => Validate("right"));
        keywordRecognizer = new KeywordRecognizer(actions.Keys.ToArray());
        keywordRecognizer.OnPhraseRecognized += RecognizedSpeech;
        keywordRecognizer.Start();
    }
Esempio n. 12
0
    void Awake()
    {
        gameManagerSystem = new GameManagerSystem();

        CreateNewGame();
    }
Esempio n. 13
0
    void Awake()
    {
        gameManagerSystem = new GameManagerSystem();

        CreateNewGame();
    }
Esempio n. 14
0
 public TOHGame() : base()
 {
     GameManager = new GameManagerSystem(Services);
     Services.AddService(GameManager);
 }
Esempio n. 15
0
 void Start()
 {
     //this line finds the gameobject with the tag it is attached to and will also get the Script in the object as well
     GMS = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerSystem>();
 }
Esempio n. 16
0
 // Start is called before the first frame update
 private void Start()
 {
     _gameManagerSystem = FindObjectOfType <GameManagerSystem>();
     _audioSource       = GetComponent <AudioSource>();
     IsAlive            = true;
 }
Esempio n. 17
0
 public void Initialize()
 {
     gameManagerSystem = new GameManagerSystem();
 }
Esempio n. 18
0
 public void Initialize()
 {
     gameManagerSystem = new GameManagerSystem();
 }
 protected override void OnCreate()
 {
     gmsys = World.GetOrCreateSystem <GameManagerSystem>();
 }