コード例 #1
0
    IEnumerator Start()
    {
        player = GameObject.Find("player01").GetComponent <player01>();
        if (player.left)
        {
            direction = 1;
        }
        else
        {
            direction = -1;
        }
        transform.parent = null;
        blast_rb         = GetComponent <Rigidbody2D>();
        yield return(new WaitForSeconds(0.18f));

        player.strong     = false;
        blast_rb.velocity = new Vector2(speed * direction, blast_rb.velocity.y);
        Destroy(this.gameObject, 1);
    }
コード例 #2
0
ファイル: hud.cs プロジェクト: Lucas-Sawyer/Fighters
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.Find("player01").GetComponent <player01>();
 }
コード例 #3
0
ファイル: bean.cs プロジェクト: Lucas-Sawyer/Fighters
 // Start is called before the first frame update
 void Start()
 {
     line   = GetComponent <LineRenderer>();
     player = GameObject.Find("player01").GetComponent <player01>();
 }