Example #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;
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        parent            = transform.root.gameObject;
        _tWeakPointParent = parent.transform.Find("HitParent").GetComponent <tWeakPointParent>();
        Weakness(_tWeakPointParent.WeakpointDir);

        scaleSize = scaleMin;
    }
Example #3
0
 void Start()
 {
     //親オブジェクト取得
     _tWeakPoint = transform.root.gameObject.GetComponent <tWeakPointParent>();
 }