Example #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;
 }
Example #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>();
    }
    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>();
    }
Example #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;
 }
Example #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>();
    }
Example #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>();
    }
    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);
            }
        };
    }
Example #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();
 }
    // 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();
    }
Example #12
0
    void Awake()
    {
        gameManagerSystem = new GameManagerSystem();

        CreateNewGame();
    }
Example #13
0
    void Awake()
    {
        gameManagerSystem = new GameManagerSystem();

        CreateNewGame();
    }
Example #14
0
 public TOHGame() : base()
 {
     GameManager = new GameManagerSystem(Services);
     Services.AddService(GameManager);
 }
Example #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>();
 }
Example #16
0
 // Start is called before the first frame update
 private void Start()
 {
     _gameManagerSystem = FindObjectOfType <GameManagerSystem>();
     _audioSource       = GetComponent <AudioSource>();
     IsAlive            = true;
 }
 public void Initialize()
 {
     gameManagerSystem = new GameManagerSystem();
 }
Example #18
0
 public void Initialize()
 {
     gameManagerSystem = new GameManagerSystem();
 }
 protected override void OnCreate()
 {
     gmsys = World.GetOrCreateSystem <GameManagerSystem>();
 }