Пример #1
0
 private void Update()
 {
     while (!player_Con)
     {
         player_Con = gameObject.transform.root.GetComponent <Player_controll>();
     }
 }
Пример #2
0
    public void Attach(Player_controll player_con)
    {
        player_con.char_now.speed          += speed * player_con.char_now.item_power;
        player_con.char_now.weight         += weight * player_con.char_now.item_power;
        player_con.char_now.jump           += jump * player_con.char_now.item_power;
        player_con.char_now.jump_point_max += jump_point * player_con.char_now.item_power;

        if (player_con.char_now.speed < player_con.char_now.speed_min)
        {
            player_con.char_now.speed = player_con.char_now.speed_min;
        }

        if (player_con.char_now.weight < player_con.char_now.weight_min)
        {
            player_con.char_now.weight = player_con.char_now.weight_min;
        }

        if (player_con.char_now.jump < player_con.char_now.jump_min)
        {
            player_con.char_now.jump = player_con.char_now.jump_min;
        }

        if (player_con.char_now.jump_point_max < player_con.char_now.jump_point_max_min)
        {
            player_con.char_now.jump_point_max = player_con.char_now.jump_point_max_min;
        }
    }