Exemplo n.º 1
0
    public void Start()
    {
        scoreText  = GameObject.Find("ScoreText").GetComponent <TextMesh>();
        mainCamera = GameObject.Find("Main Camera").GetComponent <Camera>();
        cameraPos  = mainCamera.transform.position;

        var cubePull    = new GameObjectPull(cube);
        var capsulePull = new GameObjectPull(capsule);

        level = new LevelData(cubePull, capsulePull);
        CreateLevel();
    }
Exemplo n.º 2
0
    private IEnumerator effectCoroutine(GameObjectPull<EffectWithSound> effectsPull, Vector3 position, bool changeRotation)
    {
        EffectWithSound effect = effectsPull.GetObject();
        effect.transform.localScale = Vector3.one;
        effect.transform.position = position;
        if (changeRotation)
        {
            effect.transform.rotation = transform.rotation;
        }
        effect.gameObject.SetActive(true);
        effect.Play();
        yield return new WaitForSeconds(effect.Duration);

        effectsPull.ReleaseObject(effect);
    }
Exemplo n.º 3
0
 public LevelData(GameObjectPull groundPull, GameObjectPull crystalPull)
 {
     this.groundPull  = groundPull;
     this.crystalPull = crystalPull;
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     bulletsPull = new GameObjectPull <Bullet>(gameObject.AddChild("bulletsPull"), prefab, 30);
     effectsPull = new GameObjectPull <ParticleSystem>(gameObject.AddChild("effectsPull"), explosionPrefab, 30);
     camera      = FindObjectOfType <Camera>();
 }
Exemplo n.º 5
0
 private void Awake()
 {
     cellsPull = new GameObjectPull<Cell>(pullContainer, cellPrefab, 64, 10);
 }
Exemplo n.º 6
0
 private void Awake()
 {
     cellsPull = new GameObjectPull <Cell>(pullContainer, cellPrefab, 64, 10);
 }
Exemplo n.º 7
0
	void Start () {
        bulletsPull = new GameObjectPull<Bullet>(new GameObject("BulletsPull"), prefab, 30);
        shootsPull = new GameObjectPull<EffectWithSound>(new GameObject("ShootPull"), shootEffect, 30);
        explosionsPull = new GameObjectPull<EffectWithSound>(new GameObject("ExplosionsPull"), explosionEffect, 30);
	}
Exemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     cubesPull = new GameObjectPull <Vulnerable>(gameObject.AddChild("CubesPull"), prefab, 50, 10);
 }