コード例 #1
0
 // Use this for initialization
 void Awake()
 {
     ui  = FindObjectOfType <FlyUI>();
     giv = FindObjectOfType <GiveEnemy>();
     gt  = FindObjectOfType <GetThing>();
     au  = FindObjectOfType <MusicAll>();
 }
コード例 #2
0
 void BossDie()
 {
     GetComponent <Collider2D>().enabled = false;
     if (FlyUI.scoreAdd != null)
     {
         FlyUI.scoreAdd(lastScore);
     }
     gt.GetThings(transform.position, Random.Range(0, 10));
     Destroy(this.gameObject);
 }
コード例 #3
0
 public void Die()
 {
     GetComponent <Collider2D>().enabled = false;
     if (FlyUI.scoreAdd != null)
     {
         FlyUI.scoreAdd(enemyScore);
     }
     GetEnemy.Instance.enemys.Remove(this);
     gt.GetThings(transform.position, Random.Range(0, 10));
     Destroy(this.gameObject);
 }
コード例 #4
0
ファイル: Move.cs プロジェクト: 1004019267/ThunderPlane
    void Start()
    {
        ui              = FindObjectOfType <FlyUI>();
        FlyUI.scoreAdd += this.AddScore;
        FlyUI.dieAdd   += this.AddDie;
        Vector3 rect = Camera.main.ScreenToWorldPoint(new Vector2(Screen.width, Screen.height));

        halfBoardX = this.GetComponent <Renderer>().bounds.size.x / 4;
        halfBoardY = this.GetComponent <Renderer>().bounds.size.y / 4;
        maxX       = rect.x - halfBoardX;
        maxY       = rect.y - halfBoardY;
    }
コード例 #5
0
 public void Hurt(int damage)
 {
     if (hp > 0)
     {
         hp -= damage;
         if (FlyUI.scoreAdd != null)
         {
             FlyUI.scoreAdd(damage * 4);
         }
         if (hp <= 0)
         {
             PlayEffect();
             BossDie();
             giv.isNull = true;
             au.Bgm(3);
             ui.winOrNext();
         }
     }
 }
コード例 #6
0
 public void Hurt(int damage)
 {
     if (hp > 0)
     {
         hp -= damage;
         GetHelp();
         if (FlyUI.scoreAdd != null)
         {
             FlyUI.scoreAdd(damage * 2);
         }
         if (hp <= 0)
         {
             PlayEffect();
             BossDie();
             giv.isNull = true;
             au.Bgm(0);
         }
     }
 }
コード例 #7
0
 // Use this for initialization
 void Start()
 {
     ui = FindObjectOfType <FlyUI>();
     ui.BigBoomNum(num);
 }