예제 #1
0
 void Start()
 {
     source      = this.GetComponent <AudioSource>();
     source.clip = audioKill;
     player      = this.transform.parent.gameObject;
     moveScript  = player.GetComponent <move_player>();
     rb2d        = player.GetComponent <Rigidbody2D>();
 }
예제 #2
0
    //Text value;

    // Use this for initialization
    void Start()
    {
        location      = gameObject.GetComponent <RectTransform>();
        player        = GameObject.Find("player"); //make sure player is rendering before this is called!
        player_script = (move_player)player.GetComponent(typeof(move_player));
        speed         = 1;                         //Will update to whatever is in player_script after first frame
        y_max         = location.position.y;
        y_min         = location.position.y - location.rect.width;
        x             = location.position.x;

        //find value
        //value.text = "100.00%"; //Will update after first frame
    }
예제 #3
0
 void Start()
 {
     //rb2d = player.GetComponent<Rigidbody2D>();
     scriptMove = player.GetComponent <move_player>();
 }