Пример #1
0
 // Use this for initialization
 void Start()
 {
     controller = GetComponent <Contoroller2d>();
     //PSM = GameObject.Find("PlaySceneManager").transform.GetComponent<PlaySceneManager>();
     AudioSource[] audioSources = GetComponents <AudioSource>();
     sound01 = audioSources[0];
     sound02 = audioSources[1];
     sound03 = audioSources[2];
 }
Пример #2
0
    new void Start()
    {
        //状態異常の初期化
        ButState.Stan = false;

        //上昇ステータス
        statesUp.Invincible   = false;
        statesUp.Substitution = false;

        controller = GetComponent <Contoroller2d>();
        PSM        = GameObject.Find("PlaySceneManager").transform.GetComponent <PlaySceneManager>();
        rig        = GetComponent <Rigidbody2D>();

        // プレイヤー同士の当たり判定をしない
        int P_layer = LayerMask.NameToLayer("Player");

        Physics2D.IgnoreLayerCollision(P_layer, P_layer);

        //HPゲージを取得する
        HPgageObj = PSM.SetHPgage(CNConvert(ControlerNamber) + 1);
    }