示例#1
0
    // Use this for initialization
    void Start()
    {
        //パーティクル
        hitParticle   = Resources.Load("yResources/HitParticle") as GameObject;
        blowParticle2 = Resources.Load("yResources/BlowParticle") as GameObject;

        //親オブジェクト
        parent = transform.root.gameObject;

        //子オブジェクト
        hpGage = parent.transform.Find("EnemyHPgage/HPbar").GetComponent <yHpgage>();

        //オブジェクトの参照
        combo  = GameObject.Find("Combo").GetComponent <yCombo>();
        _oBase = GameObject.Find("Reference").GetComponent <oBase>();

        _tWeakPointParent = GetComponent <tWeakPointParent>();

        //親オブジェクトのあたり判定
        box2D = parent.GetComponent <BoxCollider2D>();

        //親オブジェクトの頭文字4文字(Enemyかbossか)
        enemyName = parent.name.Substring(0, 4);
        print(enemyName);

        pos = parent.transform.position;
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     obj        = GameObject.Find("Reference"); //oBaseの入っているオブジェクトを探す
     mother     = obj.GetComponent <oBase>();
     enemy9     = GameObject.Find("Enemy9");    //oBossBaseの入っているオブジェクトを探す
     enemy9Move = enemy9.GetComponent <oEnemyMove92>();
     boss       = obj.GetComponent <oBossBase>();
     hpgage     = enemy9.transform.Find("EnemyHPgage/HPbar").GetComponent <yHpgage>();
 }
示例#3
0
    void Awake()
    {
        try
        {
            yhp           = GameObject.Find("Canvas/HPvar").GetComponent <yHpgage>();
            yhp.PlayerHps = PlayerMaxHP;

            yhp.Acquisition();
        }catch (Exception e)
        {
            print(e.Message + ": HPゲージ");
        }
    }
示例#4
0
    // Use this for initialization
    void Start()
    {
        // 子オブジェクトの取得
        _child = transform.FindChild("humer").gameObject;
        if (pChildren == null)
        {
            pChildren = GameObject.Find("player");
        }
        pChildColor = pChildren.GetComponent <SpriteRenderer>().color;

        jsr = new hJoyStickReceiver();
        kcs = new hKeyConfigSettings();
        kcs.Init();

        if (yhp == null)
        {
            yhp = new yHpgage();
        }
        //yhp.Acquisition();
    }
示例#5
0
 //private
 void Start()
 {
     _yHpgage = transform.parent.transform.FindChild("EnemyHPgage").transform.FindChild("HPbar").GetComponent <yHpgage>();
 }