コード例 #1
0
    void Start()
    {
        DontDestroyOnLoad(this.gameObject);
        DontDestroyOnLoad(GameObject.FindGameObjectWithTag("PlayerUI"));

        rigidbody      = this.GetComponent <Rigidbody2D>();
        equippedWeapon = this.transform.GetChild(0).GetComponent <DualPistolsBehaviour>();

        healthText = GameObject.FindGameObjectWithTag("PlayerUI").transform.Find("HealthPanel").Find("HealthText").GetComponent <Text>();
    }
コード例 #2
0
 private void Start()
 {
     player  = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     pistols = player.transform.GetChild(0).GetComponent <DualPistolsBehaviour>();
 }