Inheritance: MonoBehaviour
 /// <summary>
 /// Initializes the stage entity managers.
 /// </summary>
 public void InitializeStageEntityManagers()
 {
     allyManager  = new AllyManager();
     enemyManager = new EnemyManager();
     bossManager  = new BossManager();
     queueManager = new QueueManager();
 }
Esempio n. 2
0
    private void OnCollisionEnter2D(Collision2D coll)
    {
        //Time.timeScale = 0f;
        if (coll.gameObject.tag == "Note")
        {
            GameObject  eManager   = GameObject.Find("BossManager");
            BossManager eManScript = eManager.GetComponent <BossManager>();
            eManScript.CancelSpawn();
            foreach (GameObject ge in eManScript.currentNotes)
            {
                BossMoveScript eMoveScript = ge.GetComponent <BossMoveScript>();
                eMoveScript.BossIsMoving = false;
            }

            /*foreach (GameObject ge in eManScript.currentMonster)
             * {
             *  BossMoveScript eMoveScript = ge.GetComponent<BossMoveScript>();
             *  eMoveScript.BossIsMoving = false;
             * }*/
            foreach (GameObject go in GameObject.FindGameObjectsWithTag("background"))
            {
                go.GetComponent <background_scroll> ().isMoving = false;
            }
        }
    }
Esempio n. 3
0
 void Awake()
 {
     rig         = GetComponent <Rigidbody>();
     actor       = GetComponent <Actor>();
     bossManager = GameObject.Find("BossManager").GetComponent <BossManager>();
     bossManager.InitializeBox(actor);
 }
Esempio n. 4
0
 void Start()
 {
     actor = GetComponent <Actor>();
     // currentState = State.OrbitalBeam;
     bossManager = GameObject.Find("BossManager").GetComponent <BossManager>();
     bossManager.InitializeBox(actor);
 }
Esempio n. 5
0
    public IEnumerator level1BossBattle()
    {
        // Update the status of the boss
        bossIsAlive = true;
        // Get the boss
        boss    = GameObject.FindGameObjectWithTag("Level1Boss");
        bossMan = boss.GetComponent <BossManager>();

        // Give the player a chance at the shop
        Instantiate(shopEntrance, new Vector3(8, 0, 0), transform.rotation);
        // Wait for a little while
        yield return(new WaitForSeconds(waveRate));

        // Set the leveltext to show that it's a boss fight
        UIElements[4].gameObject.GetComponent <Text>().text = "Boss Fight";
        // Show the leveltext element
        UIElements[4].gameObject.SetActive(true);
        // Wait for a few seconds
        yield return(new WaitForSeconds(3));

        // Hide the text
        UIElements[4].gameObject.SetActive(false);

        // wait while the boss is alive
        while (bossIsAlive)
        {
            yield return(new WaitForSeconds(1f));
        }
        //give the player some powerups to pick from
        yield break;
    }
Esempio n. 6
0
    void Awake()
    {
        bm = FindObjectOfType <BossManager>();
        GameObject LaserBar = GameObject.Find("LaserBar");

        laserCD = LaserBar.GetComponent <CooldownTimer>();
    }
Esempio n. 7
0
    IEnumerator OncantMove(Enemy hit, BossManager boss)
    {
        if (hit != null)
        {
            yield return(new WaitForSeconds(0.1f));

            SoundManager.instance.PlaySingle(attackSound);
            effectSc.EffectGenerate(hit);
            yield return(new WaitForSeconds(0.22f));

            hit.PlayerAttack(DamageAmount(hit));
        }
        if (boss != null)
        {
            yield return(new WaitForSeconds(0.1f));

            SoundManager.instance.PlaySingle(attackSound);
            effectSc.EffectGenerateToBoss(boss);
            yield return(new WaitForSeconds(0.22f));

            boss.PlayerAttackToBoss(DamageAmountToBoss(boss));
        }
        yield return(new WaitForSeconds(0.78f));

        isMoving = false;
        GManager.instance.playerTurn = false;
    }
Esempio n. 8
0
 private void Awake()
 {
     xyz     = GetComponent <Transform>();
     player  = FindObjectOfType <Player>().GetComponent <Player>();
     manager = (BossManager)FindObjectOfType(typeof(BossManager));
     xyzBoss = FindObjectOfType <ShadowParker>().GetComponent <Transform>();
     charger = (Boss_Charge)FindObjectOfType(typeof(Boss_Charge));
 }
Esempio n. 9
0
	public override void Init(int aLevel, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.damage = damage;
		this.level = aLevel;
		Shoot();
		Invoke("BossGetHit", 0.1f);
		Invoke("Destroy", 0.5f);
	}
Esempio n. 10
0
 private void Awake()
 {
     sprite  = GetComponent <SpriteRenderer>();
     xyz     = GetComponent <Transform>();
     manager = (BossManager)FindObjectOfType(typeof(BossManager));
     charge  = (Boss_Charge)FindObjectOfType(typeof(Boss_Charge));
     boss    = (ShadowParker)FindObjectOfType(typeof(ShadowParker));
 }
Esempio n. 11
0
 void Start()
 {
     enemyAnim = gameObject.GetComponent <Animator> ();
     gm        = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <gameMaster> ();
     boss      = gameObject.GetComponent <BossManager> ();
     //turret1 = GameObject.FindGameObjectWithTag ("Turret2").GetComponent<TurretHealth> ();
     //turret2 = GameObject.FindGameObjectWithTag ("Turret1").GetComponent<TurretHealth> ();
 }
Esempio n. 12
0
    protected void Init(float _cooldownMin, float _cooldownMax)
    {
        minCooldown = _cooldownMin;
        maxCooldown = _cooldownMax;

        bossRef = GameObject.Find("BossManager").GetComponent<BossManager>();
        if(bossRef == null)
            Debug.LogError("BossAttackBase():Init: Didn't get the BossManager component correctly");
    }
Esempio n. 13
0
    private void Awake()
    {
        if (instance != null)
        {
            return;
        }

        instance = this;
    }
 void Awake()
 {
     if (Instance == null) {
         Instance = this;
     }
     else {
         Destroy(this);
     }
 }
Esempio n. 15
0
	public override void Init(int level, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.damage = damage;
		explodePrefab.gameObject.SetActive(false);
		SpawnParticle();
		base.Init();
		// transform.position = ScreenManager.Instance.CurrentSlotScreen.userAvatarPanel.position;

	}
Esempio n. 16
0
 public override void Init(int aLevel, int damage, BossManager bossManager)
 {
     this.bossManager = bossManager;
     this.damage      = damage;
     this.level       = aLevel;
     Shoot();
     Invoke("BossGetHit", 0.1f);
     Invoke("Destroy", 0.5f);
 }
 void Start()
 {
     rb           = GetComponent <Rigidbody2D>();
     bossmanager  = GetComponent <BossManager>();
     mirarJugador = GetComponent <MirarJugador>();
     rbplayer     = player.GetComponent <Rigidbody2D>();
     movPlayer    = player.GetComponent <Movimiento8D>();
     anim         = GetComponent <Animator>();
 }
Esempio n. 18
0
	public virtual void Init(int level, int damage, BossManager bossManager) {
		size = new Vector3(120f, 120f, 1);
		transform.localScale = size;
		transform.position = ScreenManager.Instance.CurrentSlotScreen.userAvatarPanel.position;
		Vector3 target = bossManager.transform.position;
		transform.rotation = Quaternion.Euler(0 , 0, Mathf.Atan2((target.y - transform.position.y), (target.x - transform.position.x))*Mathf.Rad2Deg);			
		this.bossManager = bossManager;
		this.damage = damage;
	}
Esempio n. 19
0
    void Awake()
    {
        audioManager = AudioManager.instance;
        roomManager  = RoomManager.instance;

        bossManager = GetComponent <BossManager>();

        gui.ShowGUI(false);
    }
Esempio n. 20
0
 public override void Init(int level, int damage, BossManager bossManager)
 {
     this.bossManager = bossManager;
     this.damage      = damage;
     explodePrefab.gameObject.SetActive(false);
     SpawnParticle();
     base.Init();
     // transform.position = ScreenManager.Instance.CurrentSlotScreen.userAvatarPanel.position;
 }
Esempio n. 21
0
    private void Start()
    {
        sprite        = GetComponent <SpriteRenderer>();
        polyCol       = GetComponent <PolygonCollider2D>();
        boxCol        = GetComponent <BoxCollider2D>();
        Player_script = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
        manager       = (BossManager)GameObject.FindObjectOfType(typeof(BossManager));

        StartCoroutine(SpikesUp());
    }
Esempio n. 22
0
 void Awake()
 {
     parent       = GetComponentInParent <ShadowParker>();
     xyz          = GetComponent <Transform>();
     player       = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
     bossSprite   = FindObjectOfType <ShadowParker>().GetComponent <SpriteRenderer>();
     playerSprite = player.GetComponent <SpriteRenderer>();
     manager      = FindObjectOfType <BossManager>();
     charge       = FindObjectOfType <Boss_Charge>();
 }
Esempio n. 23
0
	public override void Init(int aLevel, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.damage = damage;
		this.level = aLevel;
		SpawnParticle();
		transform.position = bossManager.GetBossMiddlePoint();
		// StartCoroutine("CheckIfAlive");
		StartCoroutine("BossGetHit");
		base.Init();
	}
Esempio n. 24
0
    void Awake()
    {
        xyz  = GetComponent <Transform>();
        rb2d = GetComponent <Rigidbody2D>();

        Player_script = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
        manager       = FindObjectOfType <BossManager>().GetComponent <BossManager>();

        StartCoroutine(resetSpike());
    }
Esempio n. 25
0
	public override void Init(int aLevel, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.damage = damage;
		this.level = aLevel;
		for (int i = 0; i < level; i++) {
			StartCoroutine(Shoot(i));
		}
		Invoke("BossGetHit", 0.1f);
		Invoke("Destroy", 1.5f);
	}
 void Awake()
 {
     sk11               = sk1.GetComponent <Image>();
     sk22               = sk2.GetComponent <Image>();
     acs                = GetComponent <AudioSource>();
     bossmanager_cs     = GetComponent <BossManager>();
     sound_sc           = GetComponent <Sound>();
     charactor_animator = Character.GetComponent <Animator>();
     monstermanager_cs  = GetComponent <MonsterMananger>();
 }
Esempio n. 27
0
 public override void Init(int aLevel, int damage, BossManager bossManager)
 {
     this.bossManager = bossManager;
     this.damage      = damage;
     this.level       = aLevel;
     SpawnParticle();
     transform.position = bossManager.GetBossMiddlePoint();
     // StartCoroutine("CheckIfAlive");
     StartCoroutine("BossGetHit");
     base.Init();
 }
Esempio n. 28
0
	void Awake()
	{
		if(instance == null)
		{
			instance = this;
		}
		else
		{
			DestroyImmediate(this);
		}
	}
Esempio n. 29
0
 void  EnciendeBoss()
 {
     boss        = transform.GetChild(0).gameObject;
     bossManager = boss.GetComponent <BossManager>();
     if (bossManager != null)
     {
         Debug.Log("Entro en el boss");
         boss.transform.SetParent(null);//le saca de la sala para que no se distorsione
         bossManager.enabled = true;
     }
 }
Esempio n. 30
0
 void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Esempio n. 31
0
    public virtual void Init(int level, int damage, BossManager bossManager)
    {
        size = new Vector3(120f, 120f, 1);
        transform.localScale = size;
        transform.position   = ScreenManager.Instance.CurrentSlotScreen.userAvatarPanel.position;
        Vector3 target = bossManager.transform.position;

        transform.rotation = Quaternion.Euler(0, 0, Mathf.Atan2((target.y - transform.position.y), (target.x - transform.position.x)) * Mathf.Rad2Deg);
        this.bossManager   = bossManager;
        this.damage        = damage;
    }
Esempio n. 32
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Esempio n. 33
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 34
0
	public override void Init(int level, int damage, BossManager bossManager, Vector3 fromPos) {
		this.bossManager = bossManager;
		this.damage = damage;
		this.level = level;
		this.fromPos = fromPos;
		for (int i = 0; i < level; i++) {
			StartCoroutine(Shoot(i));
		}
		Invoke("BossGetHit", 0.4f);
		Invoke("Destroy", 2f);
	}
Esempio n. 35
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Esempio n. 36
0
	public override void Init(int level, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		for (int i = 0; i < level; i++) {
			StartCoroutine(SpawnParticle(i, 0.2f * i));
		}
		transform.position = bossManager.GetBossMiddlePoint();
		// StartCoroutine("CheckIfAlive");
		bossManager.Shake();
		bossManager.GetHit(damage);
		base.Init();
	}
Esempio n. 37
0
 void Start()
 {
     vaVersCible    = true;
     explosion      = Resources.Load("Explosion/" + nomAnim, typeof(GameObject)) as GameObject;
     bossMan        = FindObjectOfType <BossManager>();
     vitesseTourner = 600f;
     personnage     = FindObjectOfType <Shinibuta>();
     boss           = cible = GameObject.FindGameObjectWithTag("Boss").transform;
     cible          = GameObject.FindGameObjectWithTag("Player").transform;
     rbMissile      = GetComponent <Rigidbody2D>();
 }
Esempio n. 38
0
    // Use this for initialization
    void Start()
    {
        lm = FindObjectOfType <LevelManager>();
        bm = FindObjectOfType <BossManager>();
        lc = FindObjectOfType <LifeCounter>();
        pc = FindObjectOfType <PlayerController>();
        sm = FindObjectOfType <ScoreManager>();
        pm = FindObjectOfType <PhoneManager>();

        SpawnFormation();
    }
Esempio n. 39
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Esempio n. 40
0
    void OnTriggerEnter2D(Collider2D other)
    {
        GameObject hit = other.gameObject;

        if (hit.layer == 8)
        {
            gameObject.SetActive(false);
            return;
        }
        if (hit.gameObject.CompareTag("Player") && !playerBullet)
        {
            hit.GetComponent <PlayerManager>().FullHealth();
            gameObject.SetActive(false);
            return;
        }

        if (hit.CompareTag("Enemy") || hit.CompareTag("EnemyMove") && playerBullet)
        {
            BossManager  bossmanager = hit.GetComponent <BossManager>();
            EnemyManager manager     = hit.GetComponent <EnemyManager>();
            Debug.Log(hit.tag);
            try
            {
                manager.HitDamage(1);
            }
            catch (NullReferenceException e)
            {
                //Debug.Log("Enemy did not have manager.hitDamage()");
            }

            try
            {
                bossmanager.HitDamage(1);
            }
            catch (NullReferenceException e)
            {
                // Debug.Log("Enemy did not have bossmanager.hitDamage()");
            }

            if (isInArena && bossmanager == null)
            {
                if (other.GetComponent <EnemyManager>().currentHealth == 0)
                {
                    arena.killcount += -1;
                    Debug.Log("Arena kill");
                }
            }

            gameObject.SetActive(false);

            return;
        }
    }
Esempio n. 41
0
	public override void Init(int level, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.attackDamage = damage;
		int smallDamage = (int)(damage / level);
		for (int i = 0; i < level; i++) {
			if (i == level - 1 && level > 1) {
				StartCoroutine(SpawnParticle(i, i * 0.15f, (damage - ((level - 1) * smallDamage))));
			} else {
				StartCoroutine(SpawnParticle(i, i * 0.15f, smallDamage));
			}
		}
		Invoke("Destroy", 2f);
	}
Esempio n. 42
0
	public override void Init(int aLevel, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.attackDamage = damage;
		this.level = aLevel;
		SpawnParticle();
		Vector3 toPos = bossManager.GetBossMiddlePoint();;
		Vector2 random = Random.insideUnitCircle / 6f;
		toPos.y += random.y;
		toPos.x += random.x;
		transform.position = toPos;
		// StartCoroutine("CheckIfAlive");
		StartCoroutine("BossGetHit");
		base.Init();
	}
Esempio n. 43
0
	public override void Init(int aLevel, int damage, BossManager bossManager) {
		this.bossManager = bossManager;
		this.damage = damage;
		this.level = aLevel;
		Vector3 toPos = bossManager.GetBossMiddlePoint();
		// Vector2 random = Random.insideUnitCircle / 6f;
		// toPos.y += random.y;
		// toPos.x += random.x;
		// transform.position = toPos;
		
		for (int i = 0; i < level; i++) {
			StartCoroutine(Shoot(i));
		}
		Invoke("BossGetHit", 0.1f);
		Invoke("Destroy", 1.5f);
	}
Esempio n. 44
0
	public override void Init(int level, int damage, BossManager bossManager, Vector3 fromPos, bool isYou) {
		this.bossManager = bossManager;
		this.damage = damage;
		this.level = level;
		if (isYou) {
			flameBig.transform.position = fromPos;
			NGUITools.SetActive(flameBig, true);
			NGUITools.SetActive(flameSmall, false);
		} else {
			flameSmall.transform.position = fromPos;
	    flameSmall.transform.rotation = Quaternion.LookRotation(bossManager.GetBossMiddlePoint() - flameSmall.transform.position);
			NGUITools.SetActive(flameBig, false);
			NGUITools.SetActive(flameSmall, true);
		}
		Invoke("BossGetHit", 1.5f);
		Invoke("Destroy", 5f);
	}
Esempio n. 45
0
	public virtual void Init(int level, int damage, BossManager bossManager) {}
Esempio n. 46
0
 // Use this for initialization
 void Start()
 {
     currentTime = tempsOuverturePorte;
     manager = GameObject.Find("BossManager").GetComponent<BossManager>();
 }
Esempio n. 47
0
 // Use this for initialization
 void Start()
 {
     bm = GameObject.FindGameObjectWithTag("Bawse").GetComponent<BossManager>();
 }
Esempio n. 48
0
 void Awake()
 {
     instance = this;
 }
Esempio n. 49
0
    // Use this for initialization
    void Awake()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        manager = GameObject.Find("BossManager").GetComponent<BossManager>();

        mapCenter = new Vector3(GameObject.Find("MapManager").GetComponent<mapGenerator>().largeur / 2f, transform.position.y, GameObject.Find("MapManager").GetComponent<mapGenerator>().longueur / 2f);
        animateur = gameObject.GetComponentInChildren<Animator>();

        //ChangeColor(Color.gray);
    }
Esempio n. 50
0
	public virtual void Init(int level, int damage, BossManager bossManager, Vector3 fromPos, bool isYou) {}