Пример #1
0
    private void Awake()
    {
        _spawner      = transform.GetChild(0).GetComponent <RandomSpawnController>();
        _moves        = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Movement>();
        _anim.enabled = _render.enabled = false;

        _spawner.enabled = _moves.enabled = false;
        StartCoroutine(AnimationBegin());
    }
Пример #2
0
    private void Awake()
    {
        _ctrl = GetComponentInParent <RandomSpawnController>();
        _rgb  = GetComponent <Rigidbody>();

        int random = Random.Range(0, 2);
        int rot    = (random == 0) ? 0 : 180;

        transform.localEulerAngles = new Vector3(0, 0, rot);
    }
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }